Skip to content

Instantly share code, notes, and snippets.

@hanneshapke
Last active April 16, 2018 02:42
Show Gist options
  • Select an option

  • Save hanneshapke/52173ea68f9df5a4e35a93ef33b1b9ed to your computer and use it in GitHub Desktop.

Select an option

Save hanneshapke/52173ea68f9df5a4e35a93ef33b1b9ed to your computer and use it in GitHub Desktop.
Extract Keras layers by layer name
def get_conv_layer(model, layer_name):
conv_layer = model.get_layer(layer_name)
output_dim = conv_layer.output_shape[1]
return conv_layer, output_dim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment