Traceback (most recent call last):


 "test_FaceDict.py", line 88, in <module>

opt = TestOptions().parse()


 "/home/nextface/DFDNet/options/base_options.py", line 114, in parse

torch.cuda.set_device(opt.gpu_ids[0])


 "/home/nextface/miniconda3/envs/DFD/lib/python3.6/site-packages/torch/cuda/__init__.py", line 281, in set_device

torch._C._cuda_setDevice(device)
RuntimeError: cuda runtime error (101) : invalid device ordinal at /opt/conda/conda-bld/pytorch_1595629427286/work/torch/csrc/cuda/Module.cpp:59

Traceback (most recent call last):


 "/content/OpenNMT-py/onmt/trainer.py", line 347, in _gradient_accumulation

trunc_size=trunc_size)


 "/content/OpenNMT-py/onmt/utils/loss.py", line 158, in __call__

loss, stats = self._compute_loss(batch, **shard)


 "/content/OpenNMT-py/onmt/utils/loss.py", line 233, in _compute_loss

scores = self.generator(bottled_output)


 "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in __call__

result = self.forward(*input, **kwargs)


 "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py", line 92, in forward

input = module(input)


 "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in __call__

result = self.forward(*input, **kwargs)


 "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/linear.py", line 67, in forward

return F.linear(input, self.weight, self.bias)


 "/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py", line 1352, in linear

ret = torch.addmm(torch.jit._unwrap_optional(bias), input, weight.t())
RuntimeError: Expected object of backend CPU but got backend CUDA for argument #4 'mat1'
