Update VGGFace.py

Tensorflow versions > 2.13 give error: AttributeError: The layer sequential has never been called and thus has no defined input.

This is solved by replacing `model.input` by `model.layers[0].input`
This commit is contained in:
timselier 2025-03-30 19:49:39 +02:00 committed by GitHub
parent 80fee9bcbe
commit 045dec0f42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -161,6 +161,6 @@ def load_model(
# base_model_output = Lambda(lambda x: K.l2_normalize(x, axis=1), name="norm_layer")(
# base_model_output
# )
vgg_face_descriptor = Model(inputs=model.input, outputs=base_model_output)
vgg_face_descriptor = Model(inputs=model.layers[0].input, outputs=base_model_output)
return vgg_face_descriptor