name = str(w.name)
else:
name = "param_" + str(i)
weight_names.append(name.encode("utf8"))
// layer modification from here:
new_weight_names = []
After Change
permute_layer_name = None
// populate attributes with layer names
attrib_layer_names = []
for name in filtered_layer_names:
layer = model.get_layer(name=name)
class_name, sublayers = remove_layer_wrapper(layer)
for tlayer in sublayers:
attrib_layer_names.append(tlayer.name)
f_out.attrs["layer_names"] = [replace_forward_slash(l).encode("utf8") for l in attrib_layer_names]
// let Keras read weights, reformat, and write to SAS-compatible file
for k, layer in enumerate(filtered_layers):
symbolic_weights = layer.weights