代码错误
Wsl-hfut-nwpu opened this issue · 4 comments
我认为你的代码有问题,当初始化的时候传入的参数batch_first=True之后,在后面的代码中并未考虑batch翻转的情况,因为seq_length, batch_size = tags.shape对batch在第二个维度进行了限制。
Hi, I don't know Mandarin (I assume that's the language you wrote, sorry if I'm wrong) so I can't understand your text. Can you write it in English?
Hi, I don't know Mandarin (I assume that's the language you wrote, sorry if I'm wrong) so I can't understand your text. Can you write it in English?
Hi~ Let me translate for you, he spoke in Chinese.
What he means:
"I think there is an error with your code. When the parameter 'batch_first=True' is passed during initialization, the subsequent code doesn't consider the batch flipping, because 'seq_length, batch_size=tags.shape' limits batch in the second dimention."
Hope it will help you understand~
@Emperorizzis Thanks for translating!
@Wsl-hfut-nwpu Are you referring to this line?
pytorch-crf/torchcrf/__init__.py
Line 181 in e843718