# Are the output dimensions of the first and second convolutional layer in YOLO paper correct?

I was reading the last version of the YOLO paper available in Arxiv, and I don't fully understand the output dimensions (I understand width and height, but not depth) of the first and second convolutional layers.

Shouldn't the output of the first layer be 112x112x64? Shouldn't the output of the second layer be 56x56x192? I thought (and this is the case after the 3rd layer) that the depth of the ouput of a conv layer is equal to the number of filters of this layer. This is why after the first conv layer (that contains 64 filters) I would expect an output depth of 64. And the same for the second conv layer that contains 192 filters, I would expect the output to have a depth of 192.

• In the diagram, they write 7x7x64-s-2. What is the meaning of the notation "64-s-2"? That's probably going to answer your question. Feel free to answer your own question below, if you find an answer to it.
– nbro
Dec 15, 2021 at 10:33
• I don't think that's the solution. s-2 means stride of 2, and this stide results in the input dimensions being divided by 2 in the output. This is why after the first two s-2 layers (one conv and one maxpool), the 448x448 input is transformed into a 112x112 output. The second s-2 maxpool layer, transforms its 112x112 input into a 56x56 output. An so on. However, this is not related in principle to the third dimension (depth). Thanks in any case! Dec 15, 2021 at 16:23
• Yes, I was thinking that s was related to stride. The other idea is that 64*3 = 192. Are they using a 3d convolution?
– nbro
Dec 15, 2021 at 16:29

In any case anyone is struggling with the same problem. It seems that they were simply typos in the original paper. I have downloaded the author's framework Darknet, as well as the configuration and weight files for YOLOv1.

Then, the architecture can be tested with one sample image using this command:

./darknet yolo test cfg/yolov1/yolo.cfg yolov1.weights data/person.jpg


The output of this command also prints the full architecure of the net. There, I see the expected depth values after the first (depth of 64) and second max layers (depth of 192):

   layer   filters  size/strd(dil)      input                output
0 Create CUDA-stream - 0
Create cudnn-handle 0
conv     64       7 x 7/ 2    448 x 448 x   3 ->  224 x 224 x  64 0.944 BF
1 max                2x 2/ 2    224 x 224 x  64 ->  112 x 112 x  64 0.003 BF
2 conv    192       3 x 3/ 1    112 x 112 x  64 ->  112 x 112 x 192 2.775 BF
3 max                2x 2/ 2    112 x 112 x 192 ->   56 x  56 x 192 0.002 BF


So it seems clear to me that the 192 and 256 depth values after the first and second max layer on the figure in the question are just typos.