Open FindTheTruth opened 5 months ago
change lm_net = lm_net.gpu() to lm_net = lm_net.to(args.device) in gpt2_ft.py
I have met the same question. I change lm_net = lm_net.gpu() to lm_net = lm_net.to(args.device) in gpt2_ft.py use the example,howver Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! what should I DO?
when I try to train NLG model on multi-gpu,I use this:
but torch report an error: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! Is there any way to solve this problem?