fdbesanto2 / skorch

A scikit-learn compatible neural network library that wraps PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image


Test Status Test Coverage Documentation Status Hugging Face Integration Powered by

A scikit-learn compatible neural network library that wraps PyTorch.

Resources

Examples

To see more elaborate examples, look here.

In an sklearn Pipeline:

With grid search:

skorch also provides many convenient features, among others:

Installation

skorch requires Python 3.8 or higher.

conda installation

You need a working conda installation. Get the correct miniconda for your system from here.

To install skorch, you need to use the conda-forge channel:

We recommend to use a conda virtual environment.

Note: The conda channel is not managed by the skorch maintainers. More information is available here.

pip installation

To install with pip, run:

Again, we recommend to use a virtual environment for this.

From source

If you would like to use the most recent additions to skorch or help development, you should install skorch from source.

Using conda

To install skorch from source using conda, proceed as follows:

If you want to help developing, run:

You may adjust the Python version to any of the supported Python versions.

Using pip

For pip, follow these instructions instead:

If you want to help developing, run:

PyTorch

PyTorch is not covered by the dependencies, since the PyTorch version you need is dependent on your OS and device. For installation instructions for PyTorch, visit the PyTorch website. skorch officially supports the last four minor PyTorch versions, which currently are:

  • 1.11.0
  • 1.12.1
  • 1.13.1
  • 2.0.1

However, that doesn't mean that older versions don't work, just that they aren't tested. Since skorch mostly relies on the stable part of the PyTorch API, older PyTorch versions should work fine.

In general, running this to install PyTorch should work:

External resources

  • @jakubczakon: blog post "8 Creators and Core Contributors Talk About Their Model Training Libraries From PyTorch Ecosystem" 2020
  • @BenjaminBossan: talk 1 "skorch: A scikit-learn compatible neural network library" at PyCon/PyData 2019
  • @githubnemo: poster for the PyTorch developer conference 2019
  • @thomasjpfan: talk 2 "Skorch: A Union of Scikit learn and PyTorch" at SciPy 2019
  • @thomasjpfan: talk 3 "Skorch - A Union of Scikit-learn and PyTorch" at PyData 2018

Communication

About

A scikit-learn compatible neural network library that wraps PyTorch

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Jupyter Notebook 80.4%Language:Python 19.6%Language:Shell 0.0%Language:Dockerfile 0.0%