How to freeze certain layers in models obtained from keras.applications
I am currrently trainning to use transfer learning on ResNet152 obtained from Keras Applications:
tf.keras.applications.ResNet152(
weights=imagenet,
input_shape=(400,250,3)
)
I know to freeze all the layers I need to set the trainable
attribute to False
, but right now I need to freeze certain layers. More specifically, I need to unfreeze the last three layers of this model but freeze the rest. So how do I do that?
Topic finetuning transfer-learning keras
Category Data Science