Skip to content

Conversation

@WuShaogui
Copy link

scores = F.softmax(logits)[:, :, :-1]

改为

scores = F.softmax(logits, dim=-1)

不然最后一个类别无法预测,因为结果被截断了,调试结果如下:

image

@lyuwenyu lyuwenyu mentioned this pull request May 24, 2024
@lyuwenyu lyuwenyu force-pushed the main branch 6 times, most recently from c9c9e18 to 55ca98f Compare August 22, 2024 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant