Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

question about label for calculating accuracy #4

Open
zgf0907 opened this issue Aug 5, 2023 · 0 comments
Open

question about label for calculating accuracy #4

zgf0907 opened this issue Aug 5, 2023 · 0 comments

Comments

@zgf0907
Copy link

zgf0907 commented Aug 5, 2023

train.py程序中计算准确率使用的label是随机生成的。
个人认为应该调用模型生成的label与真实label进行比较,而非随机生成的label与真实label比较,该问题导致模型训练准确率一直在0.5左右
label = torch.arange(5).repeat(10).type(torch.LongTensor).cuda()
correct += float(torch.sum(logits == label).item())

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant