After running the first epoch(successfully), I got the following error message and the program got interrupted:
/Users/shaun/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.55 and num_layers=1
"num_layers={}".format(dropout, num_layers))
/Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:805: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform.
nn.init.uniform(input_linear.weight, -bias, bias)
/Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:816: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform.
nn.init.uniform(weight, -bias, bias)
/Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:819: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform.
nn.init.uniform(weight, -bias, bias)
Tot it 2195 (epoch 0): 0it [00:00, ?it/s]train_wc.py:201: UserWarning: torch.nn.utils.clip_grad_norm is now deprecated in favor of torch.nn.utils.clip_gradnorm.
nn.utils.clip_grad_norm(ner_model.parameters(), args.clip_grad)
Traceback (most recent call last):
File "train_wc.py", line 212, in
dev_f1, dev_pre, dev_rec, dev_acc = evaluator.calc_score(ner_model, dev_dataset_loader)
File "/Users/shaun/Desktop/UniMelb/Semester_Unimelb/Semester3/Project/LM-LSTM-CRF/model/evaluator.py", line 209, in calc_score
decoded = self.decoder.decode(scores.data, mask_v.data)
File "/Users/shaun/Desktop/UniMelb/Semester_Unimelb/Semester3/Project/LM-LSTM-CRF/model/crf.py", line 379, in decode
decode_idx[idx] = pointer
RuntimeError: expand(torch.LongTensor{[50, 1]}, size=[50]): the number of sizes provided (1) must be greater or equal to the number of dimensions in the tensor (2)
After running the first epoch(successfully), I got the following error message and the program got interrupted:
/Users/shaun/anaconda3/lib/python3.6/site-packages/torch/nn/modules/rnn.py:38: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.55 and num_layers=1 "num_layers={}".format(dropout, num_layers)) /Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:805: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform. nn.init.uniform(input_linear.weight, -bias, bias) /Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:816: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform. nn.init.uniform(weight, -bias, bias) /Users/shaun/Desktop/UniMelb/SemesterUnimelb/Semester3/Project/LM-LSTM-CRF/model/utils.py:819: UserWarning: nn.init.uniform is now deprecated in favor of nn.init.uniform. nn.init.uniform(weight, -bias, bias)
Does anyone know how to resolve this?
Best regards