How to calculate output sizes after a convolution layer in a configuration file?
I'm new to convolutional neural networks and wanted to know how to calculate or figure out the output sizes between layers of a model given a configuration file for pytorch similar to those following instructions in this link. 

Most of the stuff I've already looked at hasn't been very clear and concise. How am I supposed to calculate the sizes through each layer?
Below is a snippet of a configuration file that would be parsed.

# (3, 640, 640)
[convolutional]
batch_normalize=1
filters=16
size=3
stride=1
pad=1
activation=leaky

[maxpool]
size=2
stride=2

# (16, 320, 320)


In short, there is a common formula for output dims calculation:



You can find explanation in A guide to receptive field arithmetic for Convolutional Neural Networks.

In addition, I'd like to recommend amazing article A guide to convolution arithmetic for deep learning.

And this repo conv_arithmetic with convolution animations.
