2 extra non trainable weights and I cannot upload the h5 file

Hello,

When I train my model, I get 2 extra non-trainable weights compared to the model in the course:


Layer (type) Output Shape Param #

input_1 (InputLayer) [(None, 224, 224, 3)] 0

mobilenetv2_1.00_224 (Funct (None, 7, 7, 1280) 2257984
ional)

global_average_pooling2d (G (None, 1280) 0
lobalAveragePooling2D)

flatten (Flatten) (None, 1280) 0

dense (Dense) (None, 1024) 1311744

dense_1 (Dense) (None, 512) 524800

bounding_box (Dense) (None, 4) 2052

=================================================================
Total params: 4,096,582
Trainable params: 4,062,468
Non-trainable params: 34,114


Then, when I upload the h5 file, I get the error:

“Your model could not be loaded. Make sure it is a valid h5 file.”

1/ Are these related?
2/ What should I do to ensure that the h5 file is loaded and the assignment graded?

Best regards,
Alex

Probably related, do I see 2 global_average_pooling2d? Hopefully if the model is as required might make the h5 unloadable!

i am not sure where 2 global_average_pooling2d twice? The second line is the continuation of the first line, it’s just that the text was wrapped. Pls advise! :slight_smile:

The submission of the h5 file might not be related to it, someone from staff is looking into that issue. Those 2 non trainable params would come from input (maybe some image shape change), average pooling and/or flatten or anything additional to the model downstream. See where they are comming from and check that layer specifically as to why!