tensorflow-yolo icon indicating copy to clipboard operation
tensorflow-yolo copied to clipboard

What's the meaning of the line 104 of file yolo_net.py?

Open LeoCHANGcn opened this issue 8 years ago • 1 comments

Why you set the first fully connected layer's input dim 49 * 1024?

LeoCHANGcn avatar Mar 03 '18 07:03 LeoCHANGcn

In the Yolo paper, Yolo actually uses 7x7 cells for predicting bboxes and doing classification. So after performing several convs and poolings, the activation maps will have the dimension of 7x7 (and actually the depth of 1024). The origin resolution of the image is 448x448. After four 2-stride-pooling layers and two 2-stride-conv layers (which can be found in the inference() function), the activation maps will be down-sampled into 448/(2^4)/(2^2) = 7. So the final activation maps will have the shape of 7x7x1024 which will be flattened into 49*1024 (in local() function) and fed into the FC layer.

wuhao5688 avatar Mar 07 '18 06:03 wuhao5688