RuntimeError: Found dtype Double but expected Float #4602
-
It seems that everytime I fix one thing another error pops up. Once again, here is the code that created the dataset:
Here is the code that creates the model:
Here is the error:
I checked all the Where could it be reading |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Are you sure that You can also use |
Beta Was this translation helpful? Give feedback.
Are you sure that
data.y
is of correct type? Since you are usingtorch.nn.functional.mse_loss
, thedtype
ofout
anddata.y
have to match. Can you confirm that this is the case?You can also use
torch.autograd.detect_anomaly
to debug this error further.