pytorch / examples
A set of examples around pytorch in Vision, Text, Reinforcement Learning, etc.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing pytorch/examples in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Summary (README)
PreviewPyTorch Examples
pytorch/examples is a repository showcasing examples of using PyTorch. The goal is to have curated, short, few/no dependencies high quality examples that are substantially different from each other that can be emulated in your existing work.
- For tutorials: https://github.com/pytorch/tutorials
- For changes to pytorch.org: https://github.com/pytorch/pytorch.github.io
- For a general model hub: https://pytorch.org/hub/ or https://huggingface.co/models
- For recipes on how to run PyTorch in production: https://github.com/facebookresearch/recipes
- For general Q&A and support: https://discuss.pytorch.org/
Available models
- Image classification (MNIST) using Convnets
- Word-level Language Modeling using RNN and Transformer
- Training Imagenet Classifiers with Popular Networks
- Generative Adversarial Networks (DCGAN)
- Variational Auto-Encoders
- Superresolution using an efficient sub-pixel convolutional neural network
- Hogwild training of shared ConvNets across multiple processes on MNIST
- Training a CartPole to balance with actor-critic
- Natural Language Inference (SNLI) with GloVe vectors, LSTMs, and torchtext
- Time sequence prediction - use an LSTM to learn Sine waves
- Implement the Neural Style Transfer algorithm on images
- Reinforcement Learning with Actor Critic and REINFORCE algorithms on OpenAI gym
- PyTorch Module Transformations using fx
- Distributed PyTorch examples with Distributed Data Parallel and RPC
- Several examples illustrating the C++ Frontend
- Image Classification Using Forward-Forward
- Language Translation using Transformers
Additionally, a list of good examples hosted in their own repositories:
Contributing
If you'd like to contribute your own example or fix a bug please make sure to take a look at CONTRIBUTING.md.