CNN - C4W2 Transfer Learning with MobileNetV2


I am getting the following error in Exercise 2 - alpaca_model section. Not sure what mistake I am making. Any ideas?

Test failed
Expected value

[‘Functional’, (None, 5, 5, 1280), 2257984]

does not match the input value:

[‘Functional’, (None, None, None, 1280), 2257984]

AssertionError Traceback (most recent call last)

My code block is:

{moderator edit - solution code removed}

Any tips are very much appreciated.

You filed this under a generic “AI Discussions” category, but fortunately I recognize that you are asking about DLS Course 4 (ConvNets) Week2 Assignment2. So I used the little “edit pencil” on the title to move it to the correct category.

Also note that we aren’t supposed to share our solution source code in public, but it does help to see it. It looks like the problem is that you have specified the input_shape to the base_model to be None. It should be based on the image shape that is the input. They gave you that value in the template code.

No harm is done with the source, since I can edit your post to remove it.


Thank you so much Paul. Silly mistake on my part.

1 Like