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

How can I know if the model is overfitting? #75

Closed
xuzhang5788 opened this issue Jan 7, 2021 · 1 comment
Closed

How can I know if the model is overfitting? #75

xuzhang5788 opened this issue Jan 7, 2021 · 1 comment

Comments

@xuzhang5788
Copy link

From your demo and tutorials, you always set epoch=100, the learning rate is a constant, and you didn't show the comparison between the training losses and the validation losses. I saw somewhere in your codes for early stopping, but I don't know how to set it. Did you have a learning rate scheduling function? Thank you!

@kexinhuang12345
Copy link
Owner

Hi, yes, the demo and tutorials follow the suggestion by the DeepDTA paper. The early stopping is automatically set to avoid overfitting. Currently, no scheduler is defined. But it should super straightforward to add. For example, add after

opt = torch.optim.Adam(self.model.parameters(), lr = lr, weight_decay = decay)
with https://pytorch.org/docs/stable/optim.html

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