Using Pytorch's dataloaders & transforms with sklearn
I have been using pytorch a lot and got used to their dataloaders and transforms, in particular when it comes to data augmentation, as they're very user-friendly and easy to understand.

However, I need to run some ML models from sklearn.

Is there a way to use pytorch's dataloaders for sklearn ?

Yes, you can. You can do this with sklearn's partial_fit method. Read HERE.


  6.1.3. Incremental learning
  
  Finally, for 3. we have a number of options inside scikit-learn. Although all algorithms cannot learn
  incrementally (i.e. without seeing all the instances at once), all
  estimators implementing the partial_fit API are candidates. Actually,
  the ability to learn incrementally from a mini-batch of instances
  (sometimes called “online learning”) is key to out-of-core learning as
  it guarantees that at any given time there will be only a small amount
  of instances in the main memory. Choosing a good size for the
  mini-batch that balances relevancy and memory footprint could involve
  some tuning [1].


Not all algorithms can do this, however. 

Then, you can use pytorch's dataloader to preprocess the data and feed it in batches to partial_fit.
