For Researchers —

Explore and extend models
from the latest
cutting edge research


How it works —

Publishing Models

PyTorch Hub supports publishing pre-trained models (model definitions and pre-trained weights) to a GitHub repository by adding a simple hubconf.py file.

Loading models

Users can load pre-trained models using torch.hub.load() API.

Here’s an example showing how to load the resnet18 entrypoint from the pytorch/vision repo.

model = torch.hub.load('pytorch/vision', 'resnet18', pretrained=True)