Traceback (most recent call last):


 "train.py", line 114, in <module>

train(epoch)


 "train.py", line 68, in train

for batch_idx, (inputs, loc_targets, cls_targets) in enumerate(trainloader):


 "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 336, in __next__

return self._process_next_batch(batch)


 "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch

raise batch.exc_type(batch.exc_msg)
RuntimeError: Traceback (most recent call last):

Traceback (most recent call last):


 "test.py", line 832, in <module>

main()


 "test.py", line 782, in main

global_step, tr_loss = train(args, train_dataset, model, tokenizer)


 "test.py", line 386, in train

outputs = model(inputs, masked_lm_labels=labels) if args.mlm else model(inputs, labels=labels)


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__

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


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/transformers/modeling_roberta.py", line 243, in forward

inputs_embeds=inputs_embeds,


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__

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


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/transformers/modeling_bert.py", line 799, in forward

input_ids=input_ids, position_ids=position_ids, token_type_ids=token_type_ids, inputs_embeds=inputs_embeds


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__

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


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/transformers/modeling_roberta.py", line 64, in forward

input_ids, token_type_ids=token_type_ids, position_ids=position_ids, inputs_embeds=inputs_embeds


 "/home/ec2-user/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/transformers/modeling_bert.py", line 193, in forward

embeddings = inputs_embeds + position_embeddings + token_type_embeddings
RuntimeError: CUDA error: device-side assert triggered
