Skip to content

Use a Given PyTorch Data Loader #980

Answered by BenjaminBossan
RoyiAvital asked this question in Q&A
Discussion options

You must be logged in to vote

You cannot pass a DataLoader instance to fit.

You can change the class of the DataLoader by passing it to the iterator_train and iterator_valid argument.

If you want to have control over the actual DataLoader instance, you'd have to subclass the net and override the get_iterator method. You can check the code, it should be quite straightforward to make it return something custom built.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@ottonemo
Comment options

@RoyiAvital
Comment options

@githubnemo
Comment options

@RoyiAvital
Comment options

@githubnemo
Comment options

Answer selected by RoyiAvital
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants