-
Notifications
You must be signed in to change notification settings - Fork 303
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
fit_loader
vs. fit_generator
#24
Comments
|
I don't think that they are equal. Generators are a very generic concept in python. I can easily do a modification of an already existing loader using generators. But the reverse doesn't hold. For example, I stumbled upon a problem with torchsample where I needed labels for a secondary loss that did not use any labels but torchsample forces me to use labels for every defined loss function, otherwise it is not executed. This would have been easy with generators:
But with At the chance of drifting off-topic, I like the fact that torchsample provides much functionality from Keras but I think it takes a lot of the flexibility when defining losses. I would have liked it if torchsample was a bit less convenient but a bit more flexible. I would be perfectly content with torchsample demanding that I supply several values in my training function (val_loss, loss, ...) as long as it lets me define the information flow of my data and the loss function. The |
+1 In my use case I am creating [X,Y] batches on-the-fly from some in-memory objects. And I cannot generate all possible [X,Y] outcomes ahead of time because it would not fit in memory. It seems like pytorch loaders are designed for fixed and fitting-in-memory datasets. Method |
@ncullen93 Would you be interested in merging PR if I would have code it? |
@githubnemo I found another keras-like wrapper library that has |
I feel that having a
fit_loader
is a special case of Keras'fit_generator
and I found myself in a situation where I was missing the latter.Is there a reason why
fit_loader
is not implemented as syntactic sugar forfit_generator
andfit_generator
is missing completely?The text was updated successfully, but these errors were encountered: