Should the depth on convolutional layers be set to a figure divisible by 2? I'm reading a book titled Python Deep Learning, and in Convolutional layers in deep learning on the chapter 5, the following is written:


  One more important point to make is that convolutional networks should generally have a depth equal to a number which is iteratively divisible by 2, such as 32, 64, 96, 128, and so on. This is important when using pooling layers, such as the max-pool layer, since the pooling layer (if it has size (2,2)) will divide the size of the input layer, similarly to how we should define "stride" and "padding" so that the output image will have integer dimensions. In addition, padding can be added to ensure that the output image size is the same as the input.


As far as I know, the width and the height should be a figure divisible by 2, in order to use a pooling layer. However, I don't understand why the depth must be a figure divisible by 2. The pooling layer just operates on a 2-dimensional screen based on width and height, and it operates on each filter (depth) separately, right?

Why should the depth also be set to a figure divisible by 2?
You are right, the way it says it, it means that the height and width should be divisible by 2.

While the argument he makes is invalid, it is a good practice for the sakes of memory efficiency to make some parameters like the batch size divisible by 2. I'm guessing you want to make more efficient use of memory blocks. The same logic could apply to the depth of convolutional layers.

This is no way as important as the author of the book says!