You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "F:/Python_Projects/HSCRF_NER_pytorch/train.py", line 203, in
evaluator.calc_score(model, dev_dataset_loader)
File "F:\Python_Projects\HSCRF_NER_pytorch\model\evaluator.py", line 181, in calc_score
scrf_result_scored_by_crf = utils.rescored_with_crf(decoded_scrf, self.l_map, ner_model.crf.crf_scores)
File "F:\Python_Projects\HSCRF_NER_pytorch\model\utils.py", line 871, in rescored_with_crf
tg_energy = torch.gather(scores.view(seq_len, bat_size, -1), 2, scrfdata).view(seq_len, bat_size)
RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at c:\users\administrator\downloads\new-builder\win-wheel\pytorch\aten\src\thc\generic/THCTensorScatterGather.cu:29
Process finished with exit code 1
on using crf model to score the prediction of scrf,
file utils.py, in function scrf_to_crf(): after the prediction of scrf is converted crf data, its sequence lenght is not consistent with the sequence lenght of crf model scores. the former = lenght of sentence + 1,but the latter = thresholds[idx].
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "F:/Python_Projects/HSCRF_NER_pytorch/train.py", line 203, in
evaluator.calc_score(model, dev_dataset_loader)
File "F:\Python_Projects\HSCRF_NER_pytorch\model\evaluator.py", line 181, in calc_score
scrf_result_scored_by_crf = utils.rescored_with_crf(decoded_scrf, self.l_map, ner_model.crf.crf_scores)
File "F:\Python_Projects\HSCRF_NER_pytorch\model\utils.py", line 871, in rescored_with_crf
tg_energy = torch.gather(scores.view(seq_len, bat_size, -1), 2, scrfdata).view(seq_len, bat_size)
RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at c:\users\administrator\downloads\new-builder\win-wheel\pytorch\aten\src\thc\generic/THCTensorScatterGather.cu:29
Process finished with exit code 1
on using crf model to score the prediction of scrf,
file utils.py, in function scrf_to_crf(): after the prediction of scrf is converted crf data, its sequence lenght is not consistent with the sequence lenght of crf model scores. the former = lenght of sentence + 1,but the latter = thresholds[idx].
The text was updated successfully, but these errors were encountered: