26b2098c8b1da3898324a0ac5acb3a14e3d6076c,theanolm/network/architecture.py,Architecture,from_description,#Any#Any#,85

Before Change


                if not "type" in layer_description:
                    raise InputError(""type" is not given in a layer description.")
                if not "name" in layer_description:
                    raise InputError(""name" is not given in a layer description.")
                if not layer_description["inputs"]:
                    raise InputError(""input" is not given in a layer description.")
                layers.append(layer_description)

After Change


                input_description = dict()
                for field in fields[1:]:
                    parts = field.split("=", 1)
                    if len(parts) != 2:
                        raise InputError(
                            ""field=value" expected but "{}" found in an input "
                            "description in "{}"."
                            .format(field, description_file.name))
                    variable, value = parts
                    input_description[variable] = value
                if not "type" in input_description:
                    raise InputError(
                        ""type" is not given in an input description in "{}"."
                        .format(description_file.name))
                if not "name" in input_description:
                    raise InputError(
                        ""name" is not given in an input description in "{}"."
                        .format(description_file.name))
                inputs.append(input_description)

            elif fields[0] == "layer":
                layer_description = {"inputs": []}
                for field in fields[1:]:
                    parts = field.split("=", 1)
                    if len(parts) != 2:
                        raise InputError(
                            ""field=value" expected but "{}" found in a layer "
                            "description in "{}"."
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: senarvi/theanolm
Commit Name: 26b2098c8b1da3898324a0ac5acb3a14e3d6076c
Time: 2016-08-08
Author: seppo.git@marjaniemi.com
File Name: theanolm/network/architecture.py
Class Name: Architecture
Method Name: from_description


Project Name: senarvi/theanolm
Commit Name: 22a25a30d9a7fca19e6ca59c5b6ee82241e126df
Time: 2016-01-18
Author: seppo.git@marjaniemi.com
File Name: theanolm/network.py
Class Name: Architecture
Method Name: from_description


Project Name: senarvi/theanolm
Commit Name: 78bceca9f73e03e9c4fb156ce44fa6d010720704
Time: 2017-06-06
Author: peter@smitmail.eu
File Name: theanolm/scoring/latticedecoder.py
Class Name: LatticeDecoder
Method Name: decode