Kindly help as I am getting this error while doing Transfer learning assignment. The problem seems to me be coming from preprocess input not working correctly.
Error:
Test failed
Expected value
[‘InputLayer’, [(None, 160, 160, 3)], 0]
does not match the input value:
[‘InputLayer’, [(1, 160, 160, 3)], 0]
the input shape to Mobilenet v2 is also correct. The data augmentation give the [1,160,160,3] shape and preprocessing doesn’t seems to change it
Please click my name and message your notebook as an attachment.
Posting solution code in a public topic is discouraged and can get your account suspended. It’s okay to share stacktrace on a public post and send code to a mentor via direct message. Do clean up the post.
I’m sure Balaji will be able to help by looking at the source code. Without seeing the code, one point to consider is that you don’t need to specify the first dimension (samples dimension) in your code. You just write the layers to handle the rest of the dimensions and then “samples” gets determined at runtime. That’s why it should show as “None” in the summary output of the model: because you don’t know it at model definition time, whereas you do know the other dimensions at model definition time. Minibatches can have any size 1 or larger and your code needs to handle that.
Grateful to those who responded fortunately when I submitted the assignment the grade came out to be correct despite the code failure error during assignment