visinf / dpp

Detail-Preserving Pooling in Deep Networks (CVPR 2018)
BSD 3-Clause "New" or "Revised" License
116 stars 23 forks source link

Confusion about speed of ResNet-50 and ResNet-101 with DPP? #9

Open sebgao opened 5 years ago

sebgao commented 5 years ago

Hi! Thanks for the nice work.

I'm quite confused about whether or not DPPs for ResNet-50 and ResNet-101 are inserted as pooling layers after the bottleneck? That seems increase the computation a lot, 4.14G Flops to 6.59 Flops, which is far from the reported 5% slow-down in the original paper.

farazsaeedan commented 5 years ago

Hi. which variant of DPP have you used? and how many instances of DPP did you place in ResNet-101?

sebgao commented 5 years ago

It's th main.lua -depth 50 -batchSize 85 -nGPU 4 -nThreads 8 -shareGradInput true -data [imagenet-folder] -dataset imagenet -LR 0.033 -netType resnetdpp -poolingType DPP_sym_lite

The variant of DPP seems fixed (visinf.SpatialInverseBilateralPooling actually). However, the extra computation burden is not about DPP. It's mainly caused by larger feature maps which the bottleneck meets if we place the pooling layer after the bottleneck.

sebgao commented 5 years ago

The burden 4.14G Flops to 6.59G Flops is for the ResNet-50 one. And 7.89G Flops to 10.32G Flops for ResNet-101.