Skip to content

Instantly share code, notes, and snippets.

@ajinkyajawale14499
Created July 8, 2019 20:18
Show Gist options
  • Select an option

  • Save ajinkyajawale14499/933e9b3a4ff055b61b524083776b819a to your computer and use it in GitHub Desktop.

Select an option

Save ajinkyajawale14499/933e9b3a4ff055b61b524083776b819a to your computer and use it in GitHub Desktop.
# Let's take a look to see how many layers are in the base model
print("Number of layers in the base model: ", len(base_model.layers))
# Fine tune from this layer onwards
fine_tune_at = 100
# Freeze all the layers before the `fine_tune_at` layer
for layer in base_model.layers[:fine_tune_at]:
layer.trainable = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment