Hello guys, I have some question.
In the yolo-voc.2.0.cfg, the definition of route and reorg layer is confusing to me
[route]
layers=-9
[reorg]
stride=2
[route]
layers=-1,-3
From what i see from console windows when I loaded yolo weight, i see that:
Hi, @phongnhhn92
route layer is not convolutional layer, so these values -1, -3 are not filter sizes, this is relative index of layers from output of which we get data.
Yes, for example we use [reorg] stride=2, and have as input 2x2 x8, then we will have output 1x1 x32. Without changes of values.
As usual, every next layer takes as input the result of the preceding layer, and then process it (convolutional, max-pool, ...), however:
[route] layers=-1, we simply takes as input the result of the preceding layer (current_layer_number-1), without any processing.[route] layers=-2, we takes as input the result of the layer with index = (current_layer_number-2), without any processing.If we use [route] layers= -1, -3, we takes as input the result of the layers with indexes = (current_layer_number-1) and (current_layer_number-3), and merge them into one layer
If at layer-27 we have [route] layers= -1, -3, then it will take two layers 26=(27-1) and 24=(27-3), and merge its in depth: 13x13x1024 + 13x13x2048 = 13x13x3072 - is output of layer-27.

Thanks, I understand your answer ! Thanks for your help.
Most helpful comment
Hi, @phongnhhn92
route layer is not convolutional layer, so these values
-1, -3are not filter sizes, this is relative index of layers from output of which we get data.Yes, for example we use
[reorg] stride=2, and have as input2x2 x8, then we will have output1x1 x32. Without changes of values.As usual, every next layer takes as input the result of the preceding layer, and then process it (convolutional, max-pool, ...), however:
[route] layers=-1, we simply takes as input the result of the preceding layer (current_layer_number-1), without any processing.[route] layers=-2, we takes as input the result of the layer with index = (current_layer_number-2), without any processing.If we use
[route] layers= -1, -3, we takes as input the result of the layers with indexes =(current_layer_number-1)and(current_layer_number-3), and merge them into one layerIf at layer-27 we have
[route] layers= -1, -3, then it will take two layers26=(27-1)and24=(27-3), and merge its in depth:13x13x1024 + 13x13x2048=13x13x3072- is output of layer-27.