Week 1 2nd Assignment

Hello every one, I get this model fitting error even though all the previous codes runs in the right way and I didn’t understand why
please can any one help, thanks in advance.


Please click my name and message your notebook as an attachment.

Hey @Seyf_Dardouri,
The mentors don’t have access to your Coursera Labs via Coursera. For sharing your notebook as an attachment, first you have to download your notebook, the instructions for which you can find listed as Method 1 in here. Once your notebook is downloaded, you can click on Balaji’s name and upload it as an attachment. I hope this helps.

P.S. - Sharing code publicly is strictly against the community guidelines, so please ensure that you DM your notebook.

Cheers,
Elemento

Just for the record, that was exactly what Elemento just told you was against the rules: posting your notebook in a public thread, as opposed to a private DM.

Hey @Seyf_Dardouri,
I can’t see any of your code in the notebook that you just attached. Just to explicitly state it here, you have to write the code in the exercises.

Cheers,
Elemento

@Seyf_Dardouri: I took a look at your notebook and it looks like a “clean” copy. None of the code had been filled in. See the “YOUR CODE HERE” blocks: there is nothing there.

Yeah you’re right, that is the old file what I sent, Sorry
but still I get the error when I run : happy_model.fit(X_train, Y_train, epochs=10, batch_size=16)

and the error is : InvalidArgumentError: Incompatible shapes: [16,64,64] vs. [16,1]
[[node Equal (defined at :1) ]] [Op:__inference_train_function_826]

Function call stack:
train_function

Are you sure that your previous functions all pass the tests? Did you perhaps omit a “Flatten” layer someplace? Looks like you are feeding a 3D array to a layer that expects a 2D array.