You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 21, 2022. It is now read-only.
The arg maxsize was added to eachbatch in #9 (in response to #8).
I believe eachbatch could use one more optional argument: zero_remainder.
If you set maxsize and zero_remainder = true, then you get the current behavior.
If you set maxsize and zero_remainder = false, then you get batches of size maxsize, no observations are ignored if the total size is not dividable by maxsize, but the last batch contains the remaining observations, even if only one.
This is useful in two regards: some people will define minibatches like that, and explicitly have batches with different numbers of observations; the number of obs per batch does not change (with the exception of the last one, of course), and you still use all obs, this could help regarding code optimization.
Also, not gonna lie, when I saw maxsize I intuitively thought it had the behavior I described above.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The arg
maxsize
was added toeachbatch
in #9 (in response to #8).I believe
eachbatch
could use one more optional argument:zero_remainder
.If you set
maxsize
andzero_remainder = true
, then you get the current behavior.If you set
maxsize
andzero_remainder = false
, then you get batches of sizemaxsize
, no observations are ignored if the total size is not dividable bymaxsize
, but the last batch contains the remaining observations, even if only one.This is useful in two regards: some people will define minibatches like that, and explicitly have batches with different numbers of observations; the number of obs per batch does not change (with the exception of the last one, of course), and you still use all obs, this could help regarding code optimization.
Also, not gonna lie, when I saw
maxsize
I intuitively thought it had the behavior I described above.The text was updated successfully, but these errors were encountered: