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

drop_last (bool, optional) - more options needed #17075

Closed
petertarabawrai opened this issue Feb 13, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@petertarabawrai
Copy link

commented Feb 13, 2019

drop_last (bool, optional) – set to True to drop the last incomplete batch, if the dataset size is not divisible by the batch size. If False and the size of dataset is not divisible by the batch size, then the last batch will be smaller. (default: False)

What if I want to redistribute data from last incomplete batch into other batches, so I don't loose any training (or testing) data?

@SsnL

This comment has been minimized.

Copy link
Collaborator

commented Feb 14, 2019

  1. If you want to discard the notion of epoch, use a custom batch_sampler.
  2. Do it outside dataloader.

@SsnL SsnL closed this Feb 14, 2019

@petertarabawrai

This comment has been minimized.

Copy link
Author

commented Feb 14, 2019

Doesn't notion give more freedom than definition?

@SsnL

This comment has been minimized.

Copy link
Collaborator

commented Feb 14, 2019

@petertarabawrai What you you mean by notion?

@petertarabawrai

This comment has been minimized.

Copy link
Author

commented Feb 14, 2019

you said 'if i want to discard the notion of epoch', which I don't. By notion I understand something lighter than theory. what did you mean by notion?

@SsnL

This comment has been minimized.

Copy link
Collaborator

commented Feb 15, 2019

Notion as similar to concept.

If you are not discarding the concept of epoch, then you basically have to accept that there is only one iterator for each pass/epoch on the dataset, and that you can’t merge data across epochs/iterators.

@petertarabawrai

This comment has been minimized.

Copy link
Author

commented Feb 15, 2019

I have following order in my head: idea, notion, concept, definition. Idea can be dumb, notion can be whimsy, concept sounds more serious, definition is precise. We don't even have to agree to continue main discussion.

  1. I finally get why you said 'if I want to discard the notion of epoch'. Maybe I could forget about epoch in order to not lose any data.
  2. If iterator knows in advance amount of all samples, it can plan accordingly. If you say iterator does not know amount of all samples in advance, that is only for the first epoch. In all following epochs it can plan accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.