Skip to content

Instantly share code, notes, and snippets.

@saurabhpal97
Created April 16, 2019 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabhpal97/7b2b2d3a26749b42c248da5b1593222b to your computer and use it in GitHub Desktop.
Save saurabhpal97/7b2b2d3a26749b42c248da5b1593222b to your computer and use it in GitHub Desktop.
#creating a mapping of layer name ot layer details
#we will create a dictionary layers_info which maps a layer name to its charcteristics
layers_info = {}
for i in model.layers:
layers_info[i.name] = i.get_config()
#here the layer_weights dictionary will map every layer_name to its corresponding weights
layer_weights = {}
for i in model.layers:
layer_weights[i.name] = i.get_weights()
print(layers_info['block5_conv1'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment