Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Created July 29, 2020 14:52
Show Gist options
  • Select an option

  • Save sadimanna/6df2548b7555c1d3967d21b38e2e9ba2 to your computer and use it in GitHub Desktop.

Select an option

Save sadimanna/6df2548b7555c1d3967d21b38e2e9ba2 to your computer and use it in GitHub Desktop.
NUM_CLASSES = 5
fine_tuning = True
model = Sequential()
model.add(ResNet50(include_top=False,pooling='avg',weights='imagenet',input_shape=(H,W,3)))
model.add(Dense(NUM_CLASSES,activation = 'sigmoid'))
if fine_tuning:
model.layers[0].trainable = True
else:
model.layers[0].trainable = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment