WongKinYiu / CrossStagePartialNetworks

Cross Stage Partial Networks
https://github.com/WongKinYiu/CrossStagePartialNetworks
894 stars 172 forks source link

shortcut error in csresnext50-panet-spp-original-optimal.cfg #13

Open Libaishun opened 4 years ago

Libaishun commented 4 years ago

in the cfg file, the first shortcut layer cut is from -4, which is convolutional layer with filters=64, while the convolutional layer before this [shortcut] is filters=128, they cannot be added, is this an error? [net]

Testing

batch=1

subdivisions=1

Training

batch=64 subdivisions=8 width=512 height=512 channels=3 momentum=0.949 decay=0.0005 angle=0 saturation = 1.5 exposure = 1.5 hue=.1

learning_rate=0.00261 burn_in=1000 max_batches = 500500 policy=steps steps=400000,450000 scales=.1,.1

cutmix=1

mosaic=1

19:104x104 38:52x52 65:26x26 80:13x13 for 416

[convolutional] batch_normalize=1 filters=64 size=7 stride=2 pad=1 activation=leaky

[maxpool] size=2 stride=2

[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky

[route] layers = -2

[convolutional] batch_normalize=1 filters=64 size=1 stride=1 pad=1 activation=leaky

1-1

[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=leaky

[convolutional] batch_normalize=1 filters=128 size=3 groups=32 stride=1 pad=1 activation=leaky

[convolutional] batch_normalize=1 filters=128 size=1 stride=1 pad=1 activation=linear

[shortcut] from=-4 activation=leaky

AlexeyAB commented 4 years ago

No, this is a partial residual connection: http://openaccess.thecvf.com/content_ICCVW_2019/papers/LPCV/Wang_Enriching_Variety_of_Layer-Wise_Learning_Information_by_Gradient_Combination_ICCVW_2019_paper.pdf

cfg: https://github.com/WongKinYiu/PartialResidualNetworks/blob/master/cfg/yolov3-tiny-prn.cfg

image

Libaishun commented 4 years ago

I see, i am using a pytorch version of yolo, which implement shortcut as normal residual, and cannot parse the cfg.

Libaishun commented 4 years ago

so as the case in csresnext50-panet-spp-original-optimal.cfg, partial residual means only the first 64 channels of -1th convolutional layer add with the 64 channels of -4th convolutional layer? do you know a way implement this in pytorch?

WongKinYiu commented 4 years ago

for your reference. https://github.com/ultralytics/yolov3/issues/698#issuecomment-570422443