Skip to content

Unable to use Pytorch Dataloader in Skorch NeuralNetClassifier #993

Discussion options

You must be logged in to vote

I converted the issue into a discussion, I hope you don't mind.

Thanks for providing the code. Some points regarding your example:

  1. I assume you use the default DataLoader from PyTorch. In that case, you don't have to pass it at all, it is used by default.
  2. You instantiate a lot of classes. Although that is possible, it is not necessary. It is actually preferred to pass the class and use the double-underscore notation to pass it's argument. So e.g. instead of passing ClassifierModule(layer_sizes=...), just pass ClassifierModule and module__layer_sizes=....
  3. You have some conflicting parameters, e.g. the sample size is set to both 500 and 50000.
  4. You manually convert to PyTorch tensors from n…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@animeshkumarpaul
Comment options

@BenjaminBossan
Comment options

@animeshkumarpaul
Comment options

Answer selected by BenjaminBossan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #992 on July 09, 2023 17:24.