How pytorch/examples works
PyTorch Examples is a curated collection of independent, runnable examples rather than one application. A user selects an example, supplies data or settings, and explores a task-specific result such as a trained model, prediction, or distributed training run. The graph preserves the README’s main capability areas and sampled internal layers. Edges between examples and their internal components are limited to relationships shown in the README or source index; unsampled example internals are not inferred.
Main entry points: neural_style.py Neural Style Transfer · language_translation/main.py Language Translation · mingpt/main.py Distributed minGPT · super_resolution/main.py Super Resolution
Components 28
Vision Examples
- MNIST ConvNet
mnist/main.py - ImageNet Classifiers
imagenet/main.py - DCGAN
dcgan/main.py - Variational Autoencoder
vae/main.py - Super Resolution
super_resolution/main.py - Image Data
super_resolution/data.py - Neural Style Transfer
fast_neural_style/neural_style/neural_style.py - Transformer Network
fast_neural_style/neural_style/transformer_net.py - VGG Features
fast_neural_style/neural_style/vgg.py
Language Examples
- Word Language Model
word_language_model/main.py - Language Translation
language_translation/main.py - Translation Data
language_translation/src/data.py - Translator Model
language_translation/src/model.py - SNLI Inference
legacy/snli/train.py - SNLI Classifier
legacy/snli/model.py
Learning Examples
- Reinforcement Learning
reinforcement_learning/actor_critic.py - Forward-Forward
mnist_forward_forward/main.py - C++ Transfer Learning
cpp/transfer-learning/main.cpp - C++ Frontend
cpp/autograd/autograd.cpp
Framework Examples
- FX Transformations
fx/module_tracer.py
Distributed Examples
- Distributed Data Parallel
distributed/ddp/example.py - FSDP Training
distributed/FSDP/T5_training.py - RPC RNN
distributed/rpc/rnn/main.py - RPC RNN Model
distributed/rpc/rnn/rnn.py - Distributed minGPT
distributed/minGPT-ddp/mingpt/main.py - Character Dataset
distributed/minGPT-ddp/mingpt/char_dataset.py - GPT Trainer
distributed/minGPT-ddp/mingpt/trainer.py
Other components
- Example User
Connections 27
- Example User → MNIST ConvNet: explores
README.md - Example User → ImageNet Classifiers: explores
README.md - Example User → DCGAN: explores
README.md - Example User → Variational Autoencoder: explores
README.md - Example User → Super Resolution: explores
README.md - Example User → Neural Style Transfer: explores
README.md - Example User → Word Language Model: explores
README.md - Example User → Language Translation: explores
README.md - Example User → SNLI Inference: explores
README.md - Example User → Reinforcement Learning: explores
README.md - Example User → Forward-Forward: explores
README.md - Example User → C++ Transfer Learning: explores
README.md - Example User → C++ Frontend: explores
README.md - Example User → FX Transformations: explores
README.md - Example User → Distributed Data Parallel: explores
README.md - Example User → FSDP Training: explores
README.md - Example User → RPC RNN: explores
README.md - Example User → Distributed minGPT: explores
README.md - Super Resolution → Image Data: loads data
super_resolution/main.py - Language Translation → Translation Data: uses data
language_translation/main.py - Language Translation → Translator Model: uses model
language_translation/main.py - SNLI Inference → SNLI Classifier: uses classifier
legacy/snli/train.py - Neural Style Transfer → Transformer Network: uses network
fast_neural_style/neural_style/neural_style.py - Neural Style Transfer → VGG Features: uses features
fast_neural_style/neural_style/neural_style.py - RPC RNN → RPC RNN Model: invokes model
distributed/rpc/rnn/main.py - Distributed minGPT → Character Dataset: creates dataset
distributed/minGPT-ddp/mingpt/main.py - Distributed minGPT → GPT Trainer: creates trainer
distributed/minGPT-ddp/mingpt/main.py