neuralpredictor.pytorch icon indicating copy to clipboard operation
neuralpredictor.pytorch copied to clipboard

float32 & float64 Error

Open 24kobebryant opened this issue 4 years ago • 2 comments

I just run this code, and it occurs the problem that

found the dtype double but expect float

and I found this code may have some problems:

target = batch["val_acc"]
predict = net(batch)
loss = criterion(predict, target)

The dtype of target is float64 but the predict is float32.

Have I made some mistakes?

24kobebryant avatar Oct 23 '21 08:10 24kobebryant

I got the same error when running the python train.py

yAya-yns avatar Oct 16 '22 20:10 yAya-yns

me too,anyone knows?

hfjchdjdh avatar Sep 12 '24 13:09 hfjchdjdh