Grader failing for cell 7. Auto-grader not able to compile the code although it is passing all test cases

When creating a post, please add:

1 Like

Hi @ANANDA_MUKHERJEE ,

The error message stated there is a discrepancy on data type. The expected scalar output to have a datatype of ‘Long’, but your output has a datatype of ‘Float’. Please check your code especially when assigning variables.

1 Like

Try to cast the tensor like:

long_tensor = float_tensor.long()

1 Like

That error sounds exactly like the one on this thread. The grader apparently uses an older version of PyTorch.

1 Like