Open jaimerodric opened 1 year ago
My code is this one, and changing only the input_shape I get a error: `
def fine_VGGFace(): model = VGGFace(model="resnet50", include_top=False, input_shape=(100, 100, 3), pooling="avg", weights='vggface')
model.trainable = False x = model.output x = tf.keras.layers.Dense(1024, name='fc8', activation=None)(x) output = tf.keras.layers.Lambda(lambda x: tf.math.l2_normalize(x, axis=1))(x) # L2 normalize embeddings model_finetuning2 = tf.keras.Model(inputs=model.inputs, outputs=[output]) model_finetuning2.summary() return model_finetuning2`
Exception encountered when calling layer "avg_pool" (type AveragePooling2D).
Negative dimension size caused by subtracting 7 from 3 for '{{node avg_pool/AvgPool}} = AvgPoolT=DT_FLOAT, data_format="NHWC", ksize=[1, 7, 7, 1], padding="VALID", strides=[1, 7, 7, 1]' with input shapes: [?,3,3,2048].
My code is this one, and changing only the input_shape I get a error: `
Exception encountered when calling layer "avg_pool" (type AveragePooling2D).
Negative dimension size caused by subtracting 7 from 3 for '{{node avg_pool/AvgPool}} = AvgPoolT=DT_FLOAT, data_format="NHWC", ksize=[1, 7, 7, 1], padding="VALID", strides=[1, 7, 7, 1]' with input shapes: [?,3,3,2048].