Skip to content

conv_arithmetic

A written guide with animations explaining how convolution layers shape their outputs in deep learning.

Stars
14.7k
Forks
2.3k
Licence
MIT
Language
TeX
Last update
3.4 years ago
Type
Learning resource

This repository is archived and no longer maintained.

What it is

This is a technical report, published as a LaTeX document with supporting animations, that explains the arithmetic behind convolution operations used in deep learning. It shows how input size, padding, strides, transposed convolution and dilation determine output size, using animated diagrams. It is mainly useful as a reference for understanding these layer settings rather than as software to run.

  • Read the animated examples to see how padding and strides change the output grid
  • Check the transposed convolution and dilation sections when designing a decoder or a wider receptive field
  • Regenerate the animations locally with make all_animations
  • Compile the LaTeX report to PDF with make

Great for

  • Students learning how convolutional neural networks work
  • Developers who need to work out output sizes for padding, stride or dilation settings
  • Researchers who want a citable reference (the report is on arXiv as 1603.07285)
  • Anyone who prefers visual, animated explanations of convolution

Not ideal for

  • People looking for a ready-to-use library or application, since the repository only contains the report and animation code
  • Readers who need a current survey of modern architectures, because the repository was archived in June 2023 and the README does not discuss newer methods

How to get it

  1. 1

    Clone and build from source

    You'll need: git · make · LaTeX (for compiling the document; exact distribution not specified in the README)

    Clone the repository

    git clone https://github.com/vdumoulin/conv_arithmetic

    Generate the Makefile (from the repository root)

    ./bin/generate_makefile

    Generate the animations (from the repository root)

    make all_animations

    Compile the document (from the repository root)

    make
  2. 2

    Run it

    • Clone the repository and change into its directory
    • Run ./bin/generate_makefile to create the Makefile
    • Run make all_animations to output GIFs to the gif directory
    • Run make to compile the document
  3. 3

    Get the most out of it

    • Open the gif directory to view the padding, stride and dilation animations side by side
    • Use the PDF and PNG step outputs in the pdf and png directories to inspect individual frames
    • Read the arXiv paper linked in the README for the full written explanation

Downloads

Strengths

  • Clear animated diagrams for each main convolution variant
  • Free to use under the MIT license, with a citable arXiv paper
  • Build steps are short and listed in the README

Trade-offs

  • The repository is archived and was last pushed in 2023, so it will not receive updates
  • Building the animations and document requires a LaTeX and make toolchain that the README does not fully specify
  • The README is truncated here, so some details of the content could not be confirmed

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.