C2_W1_Assignment: value error

after I run the model.fit I got an error that Value Error

I don’t know why
“ValueError: Input 0 of layer “model_4” is incompatible with the layer: expected shape=(None, 3), found shape=(None, 400)”

Hello @Le_Thu_Thuy,

This is how it looks originally:

So you have made changes to a code cell that is not supposed to be changed, and so it has broken the flow of the notebook. Please revert any unexpected changes you have made, and on the menu bar of the jupyter notebook, click “Kernel” > “Restart”, and run the cells again.

Please note that you are only supposed to make changes in sections marked by

        ### START CODE HERE ### 

        ### END CODE HERE ### 


PS: I have to ask you to revert the changes for the sake of the assignment, even though there is an explaination to that error.

1 Like


In case you have lost track of what you have changed outside of those sections, you may following these steps to get a new copy of the notebook. In the steps, it will ask you to rename you current notebook before the system is able to get you a new one. Then you can copy your work in those sections from the current notebook to the new notebook.


1 Like

Thanks so much! I didn’t notice that I changed the original code.