Hi, I have checked.
# model.py in fastai library
preds,l = stepper.evaluate(VV(x), VV(y))
res = [delistify(to_np(l))]
res += [f(datafy(preds), datafy(y)) for f in metrics]
The error means preds is NOT in the correct data type which is supposed to be torch.Tensor. Thus, when PyTorch call the .data getter on it, it throws that runtime error.
Looks like the problem lies in the stepper.evaluate() function. It works for me and I am not so sure what have been changed in fastai library that caused this problem. I am using a slightly older version of fastai library. When is the last time you git clone and git pull from https://github.com/fastai/fastai?
Could you try to debug your notebook/code using PDB?
I will continue to check that stepper.evaluate function to see if I can spot any potential problem.
Update 1: I have checked the Stepper class and found nothing. So, the next thing to check is val_iter.next(), which is an iterator from the validation data loader object. The debugging scope here is beyond me.