Pytorch on Jupyterhub

This release adds PyTorch CPU packages to JupyterHub, so you can start using PyTorch in your notebooks without any additional setup.

The JupyterHub environment now includes the core PyTorch CPU packages commonly used for model development and inference, including torch, torchvision, and torchaudio.

Example

The following example loads a pretrained image classification model with torchvision, runs inference on uploaded images, and prints the predicted class:

Bash
Copy

To try this yourself, upload an image file to your JupyterHub workspace and update the filename in the example code.

Example output in JupyterHub is shown below.

If you are working with GPU-based hardware, you can still install the appropriate PyTorch GPU packages as usual for your environment.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
  Last updated