Follow-up question #2150 about how to define an "epoch" when the data loader is infinite #9687
gabolsgabs
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Following up the issue #2150 about how to define an "epoch" when the data loader is infinite, setting
__len__
indeed does the trick but it also restarts the infiniteIterableDataset
at the end of each epoch.For illustrating the problem, let's imagine a dataset from which we will get information from a pseudo-infinite number of files:
In the first epoch, I expect to use the files from
[:n_steps]
and then, for the next epochs the files from[n_steps*current_epoch:n_steps*current_epoch+n_step]
. However at each epoch I only have access to the[:n_steps]
files. Here's a running example:Outputs
Is there an easy way of defining the
n_steps
of eachepoch
for anIterableDataset
without restarting it? i.e. to be able to replicate this behavior:Thanks!
Beta Was this translation helpful? Give feedback.
All reactions