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

请问如何设计正则化来防止focal loss带来的过拟合会比较好?可以帮忙给出一个样例参考吗? #20

Open
qianhuiliu opened this issue Nov 24, 2023 · 0 comments

Comments

@qianhuiliu
Copy link

你好,非常感谢你的代码贡献。我在现在这样简单的优化设定下过拟合很严重:
optimizer = torch.optim.SGD(model.parameters(), lr=lr, momentum=0.9, weight_decay=1e-5)
scheduler = StepLR(optimizer, step_size=40, gamma=0.1)
看到你之前的回复说需要设置正则化来抗过拟合,请问可以帮忙给出一个正则化的方式吗?非常感谢!

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

1 participant