Create a convolutional layer from scratch in python, hack its weights with custom kernels, and verify that its results match what pytorch produces.
Access the code with this link
Python Jupyter Notebook
This notebook holds the Python code connected to this medium article:
With this code and the associated article, you are going to:
- Code from scratch in python a convolutional layer to understand bit by bit what is going on when we pass data through one of these layers.
- Hack the parameters of the convnet to produce a mix of custom kernels and random ones.
- Compare the results using Pytorch and Python-numpy to verify that we obtain exactly the same outputs. Ready? Let's do it.