Saturday 2:15 PM–3:00 PM in Data & Analysis - Room 100A

Skorch - A Union of Scikit-learn and PyTorch

Thomas Fan

Audience level:
Intermediate

Description

Skorch is a scikit-learn compatible neural network library that wraps PyTorch. skorch reduces the boilerplate needed to train a neutral network by abstracting away the training loop and providing a callback API for common tasks such as recording metrics. This talk is targeted to users familiar with the scikit-learn API and have had some exposure to neutral networks.

Abstract

Skorch is a scikit-learn compatible neural network library that wraps PyTorch. Training a neutral network in pure PyTorch requires writing: a training loop, metrics recording, model checkpointing, and other boilerplate code. skorch remedies this issue by abstracting away the training loop and providing a callback API for common tasks. This talk is targeted to users familiar with the scikit-learn API and have had some exposure to neutral networks. First, I will motivate the use-case for skorch and introduce the API. Next, I will go through concrete problems and how to use skorch's features to solve them. By the end of the talk, the audience will learn how to train a neural network using skorch, and how to extend skorch to fit their needs.

  1. Introduce and motivate the skorch API and review its similarities with the scikit-learn API.
  2. Walkthrough the classic MNIST classification problem. Explores skorch's metrics callbacks, accessing training metrics, saving/loading a model, and taking advantage of scikit-learn's GridSearchCV and Pipeline.
  3. Walkthrough a bee vs ant classification problem. Explores transfer learning, skorch's learning rate schedulers, and using PyTorch's Dataset object with skorch.
  4. Walkthrough a nuclei image segmentation problem. Explores custom metrics, cyclic learning rate scheduler, and tips for creating a PyTorch neutral network module.

Subscribe to Receive PyData Updates

Subscribe