self.layers["X"] = self.network_input
for layer_description in architecture.layers:
layer_type = layer_description["type"]
layer_name = layer_description["name"]
inputs = [ self.layers[x] for x in layer_description["inputs"] ]
if layer_description["output"] == "Y":
output_size = dictionary.num_classes()
elif layer_description["output"] == "-":
output_size = sum([ x.output_size for x in inputs ])
else:
output_size = int(layer_description["output"])
self.layers[layer_name] = create_layer(layer_type,
layer_name,
inputs,
output_size,
self,
profile=profile)
if layer_description["output"] == "Y":
self.output_layer = self.layers[layer_name]
if self.output_layer is None:
raise InputError("None of the layers in architecture description "
After Change
if value == "Y":
value = dictionary.num_classes()
else:
value = int(value)layer_options["output_size"] = value
else:
layer_options[variable] = value
layer = create_layer(layer_options, self, profile=profile)
self.layers[layer.name] = layer