Expected a 'cuda' device type for generator but found 'cpu'
Opened this issue · 2 comments
I use this command
CUDA_VISIBLE_DEVICES=0,1 python tools/cls_train.py --cfg experiments/cifar/cls_mdeq_TINY.yaml
and got this error
'Expected a 'cuda' device type for generator but found 'cpu' '
Hi @dorazhiyuyang ,
Thank you for your interest in DEQs! Could you please elaborate on your problems?
In addition, we will release a library and a model zoo for DEQs later (with systematically designed code and verified implementations). Hopefully, this can help solve the training issues. Before that, I'd suggest trying phantom grad's code to train your MDEQ.
Zhengyang
I got the same error and I fixed it changing ....../torch/utils/data/sampler.py line 121: generator = torch.Generator() to generator = torch.Generator(device='cuda') (using for example vi editor). Then if you want to train a resnet model (and I guess any explicit model) you have to change it again to: generator = torch.Generator()