K-fold Cross Validation with pytorch Data Loaders

Hello all,
Is there a way we can perform a K-fold CV using batch index data loaders in Pytorch? I mostly use sklearn’s train_test split when it comes to csv files, but not sure about directory image data loaders. Thanks

1 Like

You can refer to skorch, it’s a scikit learn compataible wrapper for pytorch

Thanks @Kushaj. I did visit the Skorch Library recently and just now again, but it is not explicit as to how to use Data Loaders with grid search. For instance what is the preferred X, y input for the fit function in this scenario? It fails when I Provide the generated training data Loader (images directly from directory) in the grid search fit function. some linky examples if there are, will be quite helpful.