C1W4A_Build_a_Conditional_GAN Grade issue

Cell #UNQ_C4. Can’t compile the student’s code. Error: RuntimeError(“Expected object of scalar type Float but got scalar type Long for sequence element 1 in sequence argument at position #1 ‘tensors’”,)

This is the justification for the 0/5 grade I got how ever I got for each section test, Success!

Also I got this after running UNQ_C4
Congratulations! If you’ve gotten here, it’s working. Please let this train until you’re happy with how the generated numbers look, and then go on to the exploration!

So why is there a problem with my grade?

If any exception gets thrown during grader execution, you get 0 for everything because it cannot complete.

This sounds like the issue on this thread.

I have same problem. Not compiling getting 0 grade even code runs very well. Not understand what is the problem.

Please show us the message under “Show grader output”. Perhaps that will be a clue as to what the issue is. As I mentioned above, any kind of exception from the grader results in 0 score, because it can’t complete the evaluation.

Thank you Paulinpaloalto for swift reply. I had wrong code types. Now corrected and solved the issue.
Thank you once again for your support.

1 Like

Could you pls tell me how to solve this problem? I met the same issue and tried to transform the type of labels too but it didn’t work​:smiling_face_with_tear:. I will very appreciated

Did you read this thread? Or are you referring to a different function?