longcw / yolo2-pytorch

YOLOv2 in PyTorch
1.54k stars 421 forks source link

anchors question #129

Open mmpp406 opened 1 year ago

mmpp406 commented 1 year ago

When multi-scale training is applied, the output feature map size also changes, so shouldn't the size of the prior anchor be modified at the same time? But why does anchors remain the same in the code?

robator0127 commented 1 year ago

it is because of view operation.code is
global_average_pool_reshaped = \ global_average_pool.permute(0, 2, 3, 1).contiguous().view(bsize, -1, cfg.num_anchors, cfg.num_classes + 5) in darknet.py