Understanding how the dimension of your input image changes as it progresses through the Neural Network Layers can be challenging to understand at times.
There is a module named 'torchsummary' which can easily do this task for you!
Here is how it works.
A Visual Thread 🧵👇
1️⃣ Consider the above example where you have already defined a model named 'ConvNet', which has
- 2 convolutional layers,
- then a dropout
- and finally 2 linear layers.
2️⃣ Let us assume that you have a single channel image of size 28*28 which can be represented as (1, 28, 28).
Now, the task is to understand how the image dimesion changes with every layer.