Reputation: 11350
I created Resnet50 using:
base_model = tf.keras.applications.ResNet50(include_top=False, weights=None, input_shape=(224, 224, 3))
base_model.trainable = True
inputs = Input((224, 224, 3))
h = base_model(inputs, training=True)
model = Model(inputs, projection_3)
model summary:
Layer (type) Output Shape Param #
=================================================================
input_image (InputLayer) [(None, 256, 256, 3)] 0
resnet50 (Functional) (None, 8, 8, 2048) 23587712
=================================================================
Later, I realized I need to access some layer like this:
Resmodel.layers[4].output
However, I got:
IndexError: list index out of range
Is there away to break the Resnet50 funcational model into mutpile layer OR there away to access a certain layer of the model.
Upvotes: 0
Views: 111