liuzechun / Bi-Real-net

Bi-Real Net: Enhancing the Performance of 1-bit CNNs With Improved Representational Capability and Advanced Training Algorithm. In ECCV 2018 and IJCV
175 stars 39 forks source link

The downsample layer in basic block is not binarized? #10

Open panda1949 opened 5 years ago

panda1949 commented 5 years ago

https://github.com/liuzechun/Bi-Real-net/blob/0a4b802f94009b8b2419d53b0152a94feff81189/18-layer/Bi-Real-net-18-train.prototxt#L355

In your code, it seems that the downsample layer in basic block is not binarized. Is it standard in the quantization field?

liuzechun commented 5 years ago

Bi-Real-net/18-layer/Bi-Real-net-18-train.prototxt

Line 355 in 0a4b802

type: "Convolution"

In your code, it seems that the downsample layer in basic block is not binarized. Is it standard in the quantization field?

I can not say whether it is standard or not to leave the downsampling layer real in the quantization field. But as I mentioned in the paper, both XNOR-Net and our paper use the un-binarized downsampling layer. Because we found the downsampling layer only consist of 1x1 convolution, which has much fewer parameters than the 3x3 convolution layers. But binarizing those layers causes large degradation in accuracy and thus binarizing those layers do more harm than gain.

lmy418lmy commented 4 years ago

https://github.com/liuzechun/Bi-Real-net/blob/0a4b802f94009b8b2419d53b0152a94feff81189/18-layer/Bi-Real-net-18-train.prototxt#L355

In your code, it seems that the downsample layer in basic block is not binarized. Is it standard in the quantization field?

Hello,the weights are binarized in your train model?