skorch-dev/skorch
A scikit-learn compatible neural network library that wraps PyTorch
What it solves
It bridges the gap between PyTorch and scikit-learn, allowing users to use PyTorch neural networks as if they were scikit-learn estimators. This eliminates the need to write repetitive boilerplate code for training loops, validation splits, and hyperparameter tuning when using PyTorch.
How it works
Skorch wraps PyTorch modules into a scikit-learn compatible interface. By providing a NeuralNetClassifier or similar wrapper, it enables the use of standard scikit-learn tools like Pipeline for preprocessing and GridSearchCV for automated hyperparameter optimization, while the underlying model remains a PyTorch neural network.
Who it’s for
Machine learning engineers and data scientists who want the flexibility of PyTorch for building models but prefer the streamlined, standardized workflow and utility tools provided by scikit-learn.
Highlights
- Scikit-learn Compatibility: Full integration with
PipelineandGridSearchCV. - Training Utilities: Built-in support for early stopping, checkpointing, and learning rate schedulers.
- Training Management: Includes progress bars for CLI and Jupyter and parameter freezing/unfreezing.
- Ecosystem Integration: Compatible with Hugging Face and GPyTorch for Gaussian Processes.
Related
- Project
- Project
- Project
- Project
- Project