Hi, there,
I am working on the C1W4A_Build_a_Conditional_GAN on Coursera. However, the auto grader keeps giving me errors (shown below) while I compile and run the codes perfectly fine on my end. The errors seem somehow related to the tensor type (float), but I have specifically made the output type float already. I also tried several versions of codes, and every one of them works well on my end, but the submission will return similar errors.
I am also attaching my codes below as well. Please let me know if there is anything I missed.
Errors:
Cell #7. Can’t compile the student’s code. Error: RuntimeError(“Expected object of scalar type Long but got scalar type Float for sequence element 1 in sequence argument at position #1 ‘tensors’”,)
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’”,)
My codes at the error cells:
{moderator edit - solution code removed}