vdumoulin / conv_arithmetic
A technical report on convolution arithmetic in the context of deep learning
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing vdumoulin/conv_arithmetic 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)
PreviewConvolution arithmetic
A technical report on convolution arithmetic in the context of deep learning.
The code and the images of this tutorial are free to use as regulated by the licence and subject to proper attribution:
- [1] Vincent Dumoulin, Francesco Visin - A guide to convolution arithmetic for deep learning (BibTeX)
Convolution animations
N.B.: Blue maps are inputs, and cyan maps are outputs.
<table style="width:100%; table-layout:fixed;"> <tr> <td><img width="150px" src="gif/no_padding_no_strides.gif"></td> <td><img width="150px" src="gif/arbitrary_padding_no_strides.gif"></td> <td><img width="150px" src="gif/same_padding_no_strides.gif"></td> <td><img width="150px" src="gif/full_padding_no_strides.gif"></td> </tr> <tr> <td>No padding, no strides</td> <td>Arbitrary padding, no strides</td> <td>Half padding, no strides</td> <td>Full padding, no strides</td> </tr> <tr> <td><img width="150px" src="gif/no_padding_strides.gif"></td> <td><img width="150px" src="gif/padding_strides.gif"></td> <td><img width="150px" src="gif/padding_strides_odd.gif"></td> <td></td> </tr> <tr> <td>No padding, strides</td> <td>Padding, strides</td> <td>Padding, strides (odd)</td> <td></td> </tr> </table>Transposed convolution animations
N.B.: Blue maps are inputs, and cyan maps are outputs.
<table style="width:100%; table-layout:fixed;"> <tr> <td><img width="150px" src="gif/no_padding_no_strides_transposed.gif"></td> <td><img width="150px" src="gif/arbitrary_padding_no_strides_transposed.gif"></td> <td><img width="150px" src="gif/same_padding_no_strides_transposed.gif"></td> <td><img width="150px" src="gif/full_padding_no_strides_transposed.gif"></td> </tr> <tr> <td>No padding, no strides, transposed</td> <td>Arbitrary padding, no strides, transposed</td> <td>Half padding, no strides, transposed</td> <td>Full padding, no strides, transposed</td> </tr> <tr> <td><img width="150px" src="gif/no_padding_strides_transposed.gif"></td> <td><img width="150px" src="gif/padding_strides_transposed.gif"></td> <td><img width="150px" src="gif/padding_strides_odd_transposed.gif"></td> <td></td> </tr> <tr> <td>No padding, strides, transposed</td> <td>Padding, strides, transposed</td> <td>Padding, strides, transposed (odd)</td> <td></td> </tr> </table>Dilated convolution animations
N.B.: Blue maps are inputs, and cyan maps are outputs.
<table style="width:25%"; table-layout:fixed;> <tr> <td><img width="150px" src="gif/dilation.gif"></td> </tr> <tr> <td>No padding, no stride, dilation</td> </tr> </table>Generating the Makefile
From the repository's root directory:
$ ./bin/generate_makefile
Generating the animations
From the repository's root directory:
$ make all_animations
The animations will be output to the gif directory. Individual animation steps
will be output in PDF format to the pdf directory and in PNG format to the
png directory.
Compiling the document
From the repository's root directory:
$ make