-
Notifications
You must be signed in to change notification settings - Fork 20
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
DataLoader.nobs could make use of partial
flag to return final number of samples being used ?
#76
Comments
In general, for Julia packages, accessing fields of a struct by name is not considered part of an API unless explicitly documented. I don't think we would want to introduce |
Thanks for the clarification 😊 |
In the
so one way to get the total number of samples in the numobs(dl.data) For dl.batchsize * (numobs(dl.data) ÷ dl.batchsize) and if I don't think an interface function like |
I have recently started learning
Flux
for doing Deep Learning and came across this unique behavior ofDataLoader
object.if we create a DataLoader object as follows ->
We get total number of samples that will be used by DataLoader as
64
which is correct.But when we set
partial=false
, we would get the same behavior as explained above w.r.t.dl.nobs
being set to same value64
.My expectation in the latter scenario would be to set
dl.nobs
to 60, because we will be throwing awaylast 4 samples
(dropping last mini-batch).As i couldn't able to find the docs for
dl.nobs
, this is my current understanding, please correct me if I'm missing something obvious here.And, if my understanding is correct, there could possibly be 2 changes needed in
main/src/dataloader.jl
file as follows ->I'm
new to Julia
, looking forward to learn and improve😃🤞The text was updated successfully, but these errors were encountered: