1) I try to rename a model and the layers in Keras with TF backend, since I am using multiple models in one script. Class Model seem to have the property model.name, but whe
To change only one layer name in a model you can use the following lines:
my_model.layers[0]._name = 'my_new_name_for_the_first_layer' my_model.layers[1]._name = 'my_new_name_for_the_second_layer' my_model.layers[-1]._name = 'my_new_name_for_the_last_layer'