Traceback (most recent call last):


 "C:\Anaconda3\Scripts\spyder-script.py", line 5, in <module>

sys.exit(spyder.app.start.main())


 "C:\Anaconda3\lib\site-packages\spyder\app\start.py", line 103, in main

from spyder.app import mainwindow


 "C:\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 49, in <module>

requirements.check_qt()


 "C:\Anaconda3\lib\site-packages\spyder\requirements.py", line 53, in check_qt

% (qt_infos['pyqt5'] + qt_infos['pyqt']))


 "C:\Anaconda3\lib\site-packages\spyder\requirements.py", line 24, in show_warning

raise RuntimeError(message)
RuntimeError: Failed to import qtpy.

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'
