// Construct it now, just to resolve dependencies.
cls._construct_template_subnet(
name=d.get("name", "unknown-subnet"),
network=network, get_parent_layer=get_layer, parent_layer_cache=d.setdefault("_parent_layer_cache", {}),
subnetwork=d["subnetwork"],
concat_sources=d.get("concat_sources", True), sources=d["sources"])
After Change
d["_subnet"] = subnet
// In case of non-template construction, this will trigger the non-template construction of our "output" sublayer.
d["_output"] = subnet.construct_layer("output", parent_get_layer=get_layer)
d["_from"] = d.get("from", "data") // cache this
d["from"] = [] // disable now. we should get them in the template construction when needed
super(SubnetworkLayer, cls).transform_config_dict(d, network=network, get_layer=get_layer)