Hi there,
I encountered some challenges while attempting to load the pretrained weights here for the Image Emotion Detection model.
Initially, I used the following code to load the model:
model = keras.models.load_model(filepath='model_weights.h5')
However, I received the following error:

Upon further investigation, I realized that the provided H5 file only contains the model weights, not the entire model structure. Consequently, I attempted to load only the weights using the following code:
model.load_weights('model_weights.h5')
Unfortunately, this resulted in another error:

It appears that the structure of the model in predict.py doesn't align with the provided pretrained weights. I would greatly appreciate your guidance on resolving this issue. If there are any additional steps or considerations that I may have overlooked, please let me know.
Hi there,
I encountered some challenges while attempting to load the pretrained weights here for the Image Emotion Detection model.
Initially, I used the following code to load the model:

model = keras.models.load_model(filepath='model_weights.h5')However, I received the following error:
Upon further investigation, I realized that the provided H5 file only contains the model weights, not the entire model structure. Consequently, I attempted to load only the weights using the following code:

model.load_weights('model_weights.h5')Unfortunately, this resulted in another error:
It appears that the structure of the model in predict.py doesn't align with the provided pretrained weights. I would greatly appreciate your guidance on resolving this issue. If there are any additional steps or considerations that I may have overlooked, please let me know.