DeepLearning Course 4, week 2, Transfer Learning

I am facing the following problem:

[‘InputLayer’, [(None, 160, 160, 3)], 0]

does not match the input value:

[‘InputLayer’, [(1, 160, 160, 3)], 0]

I wonder how to solve

1 Like

5 minutes ago it was saying “does not match the input value”, and now it says “All tests passed”. How can it be? I didnt change anything, but I ran several cells several times.

Remember that just typing code in a cell doesn’t change anything: you have to actually “execute” (Shift-Enter) on that specific cell in order for the new code to actually take effect. So “what you see is not necessarily what you get”, right? Even calling the function from a different cell does not change to the newly typed code.

It’s very easy to demonstrate this to yourself: type a syntax error into a function and then call it again from the test cell for that function. It still works, right? Now “Shift-Enter” on the purposely broken cell and then try calling it again.

I am already familiar with Jupyter, I think there is a bug in grading system)

It’s also possible that some of the previous cells are “stateful” in a way that you did not anticipate. Meaning that the order in which you execute things may matter. Just randomly bouncing around and executing one cell here and one cell there may not give predictable results. Try doing “Kernel → Restart and Clear Output” and then “Cell → Run All” and that should give consistent results.

3 Likes