ZhixiuYe/HSCRF-pytorch

On Torch 0.4

Closed this issue · 1 comments

Traceback (most recent call last):
  File "train.py", line 205, in <module>
    evaluator.calc_score(model, dev_dataset_loader)
  File "/u/suhubdyd/projects/HSCRF-pytorch/model/evaluator.py", line 172, in calc_score
    decoded_crf, crf_result_scored_by_crf = utils.decode_with_crf(ner_model.crf, word_representations, mask_v,self.l_map)
  File "/u/suhubdyd/projects/HSCRF-pytorch/model/utils.py", line 763, in decode_with_crf
    decoded_crf = crf.decode(word_reps, mask_v)
  File "/u/suhubdyd/projects/HSCRF-pytorch/model/crf_layer.py", line 131, in decode
    decode_idx[idx] = pointer
RuntimeError: expand(torch.cuda.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)

This code is written in pytorch 0.2.0_4.