Expected scalar type Long but found Float

Aakash, please help withis error am getting, I am completely new to machine learning
expected scalar type Long but found Float

I changed it to long , it then said expected float got long
what do I do or what am I doing wrong

I am not Aakash though but make sure both of your inputs are of the same type, especially if you are using Cross Entropy of any kind. That is in
F.binary_cross_entropy(x, y)
if your x is float y must be float.

1 Like

Hi Godwin, can you please share the code for the cell which is causing this issue?