C5W2A2: Cell #13. Can't compile the student's code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)

Hi,

All the codes run successfully when I was working with the notebook. The codes I wrote also produced the expected results at the end - Trained a model that predicted emojis.

When I submitted the assignment, I got an error message saying that “Cell #13. Can’t compile the student’s code. Error: ValueError('operands could not be broadcast together with shapes (5,2) (5,) ',)”

I have (1) saved the notebook before i submitted it, (2) completed the entire notebook before submitting it for grading, and (3) restarted the kernel and cleared all output, and then run all the cells and checked all the outputs carefully to be sure there is no asserts or incorrect results.

Can someone please let me know how I can proceed?
Thank you.

Hi @gckc123

The cell numbering is changeable, so the same cell could have a different numbering for my notebook, depending how often I rerun that part of the code. It would be better to give the name of the function or something that can easily locate the code block that is giving you problem.
The unit tests are there to give certain confidence of the code, but by no means a complete one.
If you could post that section of the code to me on a DM, I will have a look for you.

Hi @Kic , I have the exact same error, and the number is always #13, even if the cell numbering is changeable. I do not understand how I could solve this, so if you have any ideas please let me know.
I have saved done the same steps than @gckc123 , and tried with a fresh notebook, but that still doesn’t work.

Thank you

There is likely an error in your code that the unit tests don’t detect.