Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue changing input_shape to (100,100,3) #86

Open
jaimerodric opened this issue Sep 20, 2022 · 0 comments
Open

Issue changing input_shape to (100,100,3) #86

jaimerodric opened this issue Sep 20, 2022 · 0 comments

Comments

@jaimerodric
Copy link

jaimerodric commented Sep 20, 2022

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].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant