gitwtfhub

wtf is examples?

karpathy/examples — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2018-05-15

138PythonAudience · researcherComplexity · 3/5DormantSetup · moderate

TL;DR

A curated collection of runnable PyTorch code examples for vision, text, and reinforcement learning tasks, built as a hands-on cookbook for learning machine learning by Andrej Karpathy.

Mindmap

mindmap
  root((examples))
    What it does
      Runnable ML examples
      Vision text and RL
      Beginner to advanced
    Tech stack
      Python
      PyTorch
    Use cases
      Learn ML by example
      Template for research
      Reference for AI features
    Audience
      ML beginners
      Researchers
      AI developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Learn to build an image recognition model by running the handwritten digit recognition example.

REASON 2

Study a working language modeling or translation example to understand text-based deep learning.

REASON 3

Use the reinforcement learning pole-balancer example as a template for training a game-playing AI.

REASON 4

Reference stripped-down, production-style model code when adding AI features to an application.

What's in the stack?

PythonPyTorch

How it stacks up

karpathy/examplesnvlabs/isaaclabeurekaorange2019220/relupruner
Stars138138139
LanguagePythonPythonPython
Last pushed2018-05-152025-10-28
MaintenanceDormantQuiet
Setup difficultymoderatemoderatemoderate
Complexity3/54/54/5
Audienceresearcherresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate

Yoink these prompts

Prompt 1
Walk me through the handwritten digit recognition example in this repo and explain what each part of the training loop does.
Prompt 2
Help me modify the image generation example in this repo to work with my own dataset instead of the default one.
Prompt 3
Explain how the reinforcement learning pole-balancer example trains its agent and what the reward signal is.
Prompt 4
Show me how to adapt the language modeling example here to train on a different text corpus.

Frequently asked questions

wtf is examples?

A curated collection of runnable PyTorch code examples for vision, text, and reinforcement learning tasks, built as a hands-on cookbook for learning machine learning by Andrej Karpathy.

What language is examples written in?

Mainly Python. The stack also includes Python, PyTorch.

Is examples actively maintained?

Dormant — no commits in 2+ years (last push 2018-05-15).

How hard is examples to set up?

Setup difficulty is rated moderate.

Who is examples for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.