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 to run m validation batches after running every n training batches? #2799

Closed
benwu232 opened this issue Aug 2, 2020 · 6 comments
Closed
Labels
help wanted Open to be worked on question Further information is requested

Comments

@benwu232
Copy link

benwu232 commented Aug 2, 2020

🚀 Feature

For example, I'm runing a model on a big dataset. After every 10000 training batches, I'd like to run 1000 validation batches to check the avg_traning_loss and avg_val_loss.

I tried val_check_interval but it just run all validation dataset, which is too big and time consuming. How to validate only part of the validation data?

This is similar to #2534 with something different.

Thanks a lot!
Ben

@benwu232 benwu232 added feature Is an improvement or enhancement help wanted Open to be worked on labels Aug 2, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2020

Hi! thanks for your contribution!, great first issue!

@ydcjeff
Copy link
Contributor

ydcjeff commented Aug 2, 2020

I think Trainer(limit_val_batches=1000, val_check_interval=10000) will do that.

@Borda Borda added question Further information is requested and removed feature Is an improvement or enhancement labels Aug 2, 2020
@benwu232
Copy link
Author

benwu232 commented Aug 3, 2020

@ydcjeff Working like a charm! Thank you very much! How do you find these magic parameters? :)

@ydcjeff
Copy link
Contributor

ydcjeff commented Aug 3, 2020

@nateraw
Copy link
Contributor

nateraw commented Aug 3, 2020

Looks like this is sorted out, so I'm closing it. Thank you @ydcjeff 😄

@nateraw nateraw closed this as completed Aug 3, 2020
@benwu232
Copy link
Author

benwu232 commented Aug 8, 2020

@ydcjeff Thanks again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open to be worked on question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants