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

Make sure validation batch size smaller than validation dataset #29

Open
yangobeil opened this issue Feb 24, 2023 · 0 comments · May be fixed by #30
Open

Make sure validation batch size smaller than validation dataset #29

yangobeil opened this issue Feb 24, 2023 · 0 comments · May be fixed by #30

Comments

@yangobeil
Copy link
Contributor

By default the validation batch size is the same as the training batch size, but sometimes there are not many validation images and this gives an error when the batch size is larger than the number of validation images. I think we should add a check to make sure this does not happen.

Here is what I suggest. Add an extra value in the __init__ for the val_batch_size. If the batch size is smaller than the size of the validation dataset, then this value is the batch size. Otherwise we take something like half the size of the dataset. This will require to add the batch size as an argument in the _get_dataset method and use the correct one when we get a dataset.

@yangobeil yangobeil linked a pull request Feb 24, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant