-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hi,
I got an error while training the MTBert baseline without SQuAD dataset, all the rest settings are the same with the example command except for the number of t_total.
The error is as follows:
File "/home/ukp/mwu/MRQA-Shared-Task-2019/baseline/venv-3.6/lib/python3.6/site-packages/allennlp/commands/train.py", line 243, in train_model
metrics = trainer.train()
File "/home/ukp/mwu/MRQA-Shared-Task-2019/baseline/venv-3.6/lib/python3.6/site-packages/allennlp/training/trainer.py", line 480, in train
train_metrics = self._train_epoch(epoch)
File "/home/ukp/mwu/MRQA-Shared-Task-2019/baseline/venv-3.6/lib/python3.6/site-packages/allennlp/training/trainer.py", line 327, in _train_epoch
loss.backward()
File "/home/ukp/mwu/MRQA-Shared-Task-2019/baseline/venv-3.6/lib/python3.6/site-packages/torch/tensor.py", line 107, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/ukp/mwu/MRQA-Shared-Task-2019/baseline/venv-3.6/lib/python3.6/site-packages/torch/autograd/init.py", line 93, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
The same error happens when I tried to add additional training examples.
I would be really appreciated to know the reason of this error and how to fix it.
Thanks in advance.