Skip to content

bpesquet/pytorch-tutorial

Repository files navigation

(Yet another) PyTorch Tutorial

This repository provides annotated single-file examples for learning PyTorch.

About this project

Table of Contents

Usage

uv needs to be available on your system.

git clone https://github.com/bpesquet/pytorch-tutorial.git
cd pytorch-tutorial
uv sync
uv run python {path to example file}

Development notes

Toolchain

This project is built with the following software:

  • uv for project management;
  • ruff for code formatting and linting;
  • pytest for testing.

Useful commands

# Format all Python files
uvx ruff format

# Lint all Python files and fix any fixable errors
uvx ruff check --fix

# Run all code examples as unit tests.
# The optional -s flag prints code output.
uv run pytest [-s]

License

Creative Commons for textual content and MIT for code.

Copyright © 2025-present Baptiste Pesquet.

About

Annotated single-file examples for learning PyTorch

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
CODE_LICENSE

Stars

Watchers

Forks

Releases

No releases published

Languages