Skip to content

PyTorch Learning Hub

A library of explanations, visual checks and runnable examples for learning PyTorch or remembering how to use it. It covers the foundations from Course 1 and the training, vision and text workflows from Course 2.

What you will find here

Guides: understand a concept and connect its steps. Four topics, two pages each, with shapes, functions, parameters and common mistakes.

Projects: run the code and inspect the result. Seven original scripts with important excerpts, run commands, output explanations and complete source.

Quick reference: look up a function or error. Use the function finder, training cheatsheet, shape reminders and troubleshooting.

Choose a guide

Each topic has a first page for the main ideas and a second page for applying them. The sidebar keeps this order throughout the library.

1 · Fundamentals

Tensors, models, the learning loop and image classification.

Build and train · Images and CNNs

2 · Training

Validation metrics, tuning, data loading and memory use.

Metrics and tuning · Efficient pipelines

3 · Vision

Image variation, noise, pretrained outputs and adapting models.

Transforms and noise · Pretrained models

4 · Text

Tokenization, embeddings, variable lengths and text classification.

Tokens and embeddings · Classifiers and fine-tuning

If you are starting again: read Fundamentals first. Training explains how to compare and improve the same loop; Vision and Text show how different inputs and pretrained models fit into it. You can jump directly to a topic when reviewing.

Selected Course 2 examples

These three projects combine the most useful mechanisms across several labs. They are small original examples, with offline defaults, so you can inspect the workflow without downloading a dataset first.

The project gallery also contains the four foundation examples: regression, EMNIST letters, robust image loading and a regularized CNN. Choose a project after reading its short “What to remember” section; the full source is expandable.

How to use a page

Read the visible explanation and visual first; expand “Code and details” only when you need implementation or variants. Direct section links and search results reveal their matching details. Then use the project run command to reproduce a small workflow. Return through the sidebar for another topic, or search for an exact name such as EmbeddingBag, ReduceLROnPlateau or pin_memory.

Illustrations are labelled; toy runs demonstrate mechanisms, and retained measurements state their source. This is an independent study library with original content. About and sources explains its scope and evidence policy.