raise LayerNotFound(
"cannot get layer %r, no extra net for %r" % (layer_name, self),
layer_name=layer_name, network=self)
return extra_net.get_layer(layer_name)
if layer_name.startswith("base:"):
if not self.parent_net:
raise LayerNotFound(
"cannot get layer %r, no parent net for %r" % (layer_name, self), layer_name=layer_name, network=self)
After Change
if layer_name not in extra_net.layers:
raise LayerNotFound(
"layer %r not found in extra net %r" % (layer_name, extra_net), layer_name=layer_name, network=self)
return extra_net.layers[layer_name]
if layer_name.startswith("base:"):
if not self.parent_net:
raise LayerNotFound(
"cannot get layer %r, no parent net for %r" % (layer_name, self), layer_name=layer_name, network=self)