Skip to content

Instantly share code, notes, and snippets.

@Yuvnish017
Created June 24, 2021 06:40
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 Yuvnish017/bbe0b55a33d8fa6d035e2d60ffc61db0 to your computer and use it in GitHub Desktop.
Save Yuvnish017/bbe0b55a33d8fa6d035e2d60ffc61db0 to your computer and use it in GitHub Desktop.
model = vgg16.VGG16(weights="imagenet", include_top=False)
# Get the symbolic outputs of each "key" layer (we gave them unique names).
outputs_dict = dict([(layer.name, layer.output) for layer in model.layers])
# Set up a model that returns the activation values for every layer in
# VGG19 (as a dict).
feature_extractor = keras.Model(inputs=model.inputs, outputs=outputs_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment