9


Have a look at the YOLO architecture in the picture above.
Notice that there are two dense layers between the front conv layers (output shape: 7x7x1024)  and the final output which is in 7x7x30.
I’m trying to implement it in Pytorch and so the output of the layer before the two dense layers is 1024x7x7 (CxHxW).
Then I first reshape/flatten before passing to the two dense layers.
After the second dense layer, I again reshape it to 7x7x30.
Notice I went from 1024x7x7 (CxHxW) to 7x7x30 (HxWxC) (my labels is build using this format). My question is whether this is acceptable? I believe the dense layers between should handle this mapping from CxHxW to HxWxC. Or should I permute the dimentions somewhere in between so that both are CxHxW (or HxWxC).