Traceback (most recent call last):


 "/home/lvzhuoran/anaconda3/bin/pytext", line 11, in <module>

load_entry_point('pytext-nlp-yckj', 'console_scripts', 'pytext')()


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/core.py", line 722, in __call__

return self.main(*args, **kwargs)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/core.py", line 697, in main

rv = self.invoke(ctx)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/core.py", line 1066, in invoke

return _process_result(sub_ctx.command.invoke(sub_ctx))


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/core.py", line 895, in invoke

return ctx.invoke(self.callback, **ctx.params)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/core.py", line 535, in invoke

return callback(*args, **kwargs)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func

return f(get_current_context(), *args, **kwargs)


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/main.py", line 232, in train

train_model(config)


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/workflow.py", line 57, in train_model

trained_model, best_metric = task.train(config, rank, world_size)


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/task/task.py", line 157, in train

rank=rank,


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/trainers/trainer.py", line 146, in train

rank=rank,


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/trainers/trainer.py", line 216, in _run_epoch

logits = model(*inputs)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__

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


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/models/model.py", line 213, in forward

*input_representation, *decoder_inputs


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__

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


 "/ssd/asr/lvzhuoran/project/nlp/pytext/pytext/models/decoders/mlp_decoder.py", line 54, in forward

return self.mlp(torch.cat(input, 1))


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__

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


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward

input = module(input)


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__

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


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/modules/linear.py", line 67, in forward

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


 "/home/lvzhuoran/anaconda3/lib/python3.6/site-packages/torch/nn/functional.py", line 1354, in linear

output = input.matmul(weight.t())
RuntimeError: size mismatch, m1: [3840 x 1024], m2: [512 x 256] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:266

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'
