I have done that, and I got this error afterwords: RuntimeError: expected scalar type Float but found Int
So I then added did data = data.unsqueeze(1).float(). But when I do this I get RuntimeError: Found dtype Int but expected Float in the loss.backward() part.
Thanks for all the help so far