Calculating the size of a convolutional neural network