Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

有关训练代码的问题 #8

Open
SaltyFisher1 opened this issue Sep 26, 2024 · 5 comments
Open

有关训练代码的问题 #8

SaltyFisher1 opened this issue Sep 26, 2024 · 5 comments

Comments

@SaltyFisher1
Copy link

大佬你好,我是刚从事noisy对应性学习的研究生,您的工作非常优秀,但是我在跑您提供的开源代码时遇到一个问题,
代码
/processor.py里的 def get_loss(model, data_loader): 在计算loss进行高斯混合之前有一句 model.eval(),这里我猜是相当于进行了模型的推断,来判断样本是否为clean样本和noisy样本不应该传梯度,但是整体模型在get_loss判断完之后,好像并没有回到 model.train()模式,但是这样也能训练,这里使我产生了困惑,期待您的解答。
image

@QinYang79
Copy link
Owner

https://www.jianshu.com/p/74c02e8d28f3
这似乎确实一个疏忽之处,你可以check一下更正下该项性能是否受影响。

@QinYang79
Copy link
Owner

https://www.jianshu.com/p/74c02e8d28f3 这似乎确实一个疏忽之处,你可以check一下更正下该项性能是否受影响。

我纠正了这一项,重新进行了实验验证,跑出来的性能会略高于论文所报告的。

@SaltyFisher1
Copy link
Author

非常感谢您的回答,可以分享一下您修改的地方吗?非常感谢

@QinYang79
Copy link
Owner

非常感谢您的回答,可以分享一下您修改的地方吗?非常感谢

label_hat[consensus_division>1] = 1
label_hat[consensus_division<=1] = 0 

model.train()
for n_iter, batch in enumerate(train_loader):

@QinYang79
Copy link
Owner

⚠️ Fixing #8 will cause some performance degradation in noisy scenes. You can comment out "line217 model.train()" in processor/processor.py.

@QinYang79 QinYang79 reopened this Nov 28, 2024
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

No branches or pull requests

2 participants