C1_W3 assignement : exercice 1

Hello, I am facing a problem with the first exercise in week 3 assignment.
Everything seems to work well for the code , but I always get 2/3 passed tests and one failed.
image

I don’t know where the problem exactly is, because the function seems to output a similar image when tested to the expected output.
Lab id : ianomrvl

Hi @Dhia_Znaidi,

When you are setting up y to make one-hot encode categories, you are not passing in the number of classes.

Best,
Mubsi

Hi @Mubsi ,
I corrected the mistake, setting num_classes = 3.
But now I’m getting this error in the next cell

Hi @Dhia_Znaidi,

You have hard-coded the number of classes, that in of itself is a mistake. Also, by the way, this is incorrect. Total number of classes are actually 4. But you still shouldn’t hard code this value.

Please use the function parameters instead.

Best,
Mubsi