medium10 pts · first answer countsdeep-learningpytorchdebugging
Double versus float error
Inputs come from a NumPy float64 array: x = torch.from_numpy(arr). model(x) fails with "expected scalar type Float but found Double". What is the fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Dropout after eval()Machine Learning Engineer
- Expected starting loss, 10 classesMachine Learning Engineer
- Parameters in nn.Linear(10, 5)Machine Learning Engineer
- Why sigmoid slows deep trainingMachine Learning Engineer
- Range of tanhMachine Learning Engineer
- Cross-entropy loss by handMachine Learning Engineer
- Telling autograd to track a tensorMachine Learning Engineer
- Why wrap inference in no_gradMachine Learning Engineer