yuzhimanhua / Multi-BioNER

Cross-type Biomedical Named Entity Recognition with Deep Multi-task Learning (Bioinformatics'19)
https://arxiv.org/abs/1801.09851
Apache License 2.0
131 stars 28 forks source link

The expanded size of the tensor (15) must match the existing size (150) at non-singleton dimension 0 #13

Closed hunglq98 closed 4 years ago

hunglq98 commented 4 years ago

Hello I encountered this error while running the project to produce the results. It shows "RuntimeError: The expanded size of the tensor (15) must match the existing size (150) at non-singleton dimension 0". crf_scores = scores.view(-1, self.tagset_size, 1).expand(ins_num, self.tagset_size, self.tagset_size) + self.transitions.view(1, self.tagset_size, self.tagset_size).expand(ins_num, self.tagset_size, self.tagset_size) ảnh I have read the issues and change pytorch version to 0.3 and 0.4, but all these versions gave me the same error when they ran to that line. What can I do to solve this problem? Thank you in advance