Traceback (most recent call last):


 "/data/home/moussa/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main

"__main__", mod_spec)


 "/data/home/moussa/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code

exec(code, run_globals)


 "/data/home/moussa/fairseq/train.py", line 11, in <module>

cli_main()


 "/data/home/moussa/fairseq/fairseq_cli/train.py", line 349, in cli_main

main(args)


 "/data/home/moussa/fairseq/fairseq_cli/train.py", line 100, in main

should_end_training = train(args, trainer, task, epoch_itr)


 "/data/home/moussa/anaconda3/lib/python3.7/contextlib.py", line 74, in inner

return func(*args, **kwds)


 "/data/home/moussa/fairseq/fairseq_cli/train.py", line 176, in train

log_output = trainer.train_step(samples)


 "/data/home/moussa/anaconda3/lib/python3.7/contextlib.py", line 74, in inner

return func(*args, **kwds)


 "/data/home/moussa/fairseq/fairseq/trainer.py", line 452, in train_step

raise e


 "/data/home/moussa/fairseq/fairseq/trainer.py", line 422, in train_step

logging_outputs, sample_size, grad_norm,


 "/data/home/moussa/fairseq/fairseq/trainer.py", line 741, in _reduce_and_log_stats

metrics.log_scalar("gnorm", grad_norm, priority=400, round=3)


 "/data/home/moussa/fairseq/fairseq/logging/metrics.py", line 132, in log_scalar

agg[key].update(value, weight)


 "/data/home/moussa/fairseq/fairseq/logging/meters.py", line 70, in update

self.sum = self.sum + (val * n)
RuntimeError: "add_cpu/sub_cpu" not implemented for 'Half'

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'
