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
179 stars 39 forks source link

Conv Layer backward computation #8

Open adrianloy opened 6 years ago

adrianloy commented 6 years ago

The Readme says "The binary convolution layer is modified from https://github.com/loswensiana/BWN-XNOR-caffe, in which we modified the gradient computation method"

However, looking at the Diff of https://github.com/loswensiana/BWN-XNOR-caffe/blob/master/src/caffe/ex_layers/binary_conv_layer.cpp and https://github.com/liuzechun/Bi-Real-net/blob/master/Bi-Real-net-caffe/caffe-train/src/caffe/ex_layers/binary_conv_train_layer.cpp It looks like backward and gradients are exactly the same. Am I looking at the wrong files, or are they maybe not updated?

Thanks for any help

xiaozhupeiqi666 commented 5 years ago

The Readme says "The binary convolution layer is modified from https://github.com/loswensiana/BWN-XNOR-caffe, in which we modified the gradient computation method"

However, looking at the Diff of https://github.com/loswensiana/BWN-XNOR-caffe/blob/master/src/caffe/ex_layers/binary_conv_layer.cpp and https://github.com/liuzechun/Bi-Real-net/blob/master/Bi-Real-net-caffe/caffe-train/src/caffe/ex_layers/binary_conv_train_layer.cpp It looks like backward and gradients are exactly the same. Am I looking at the wrong files, or are they maybe not updated?

Thanks for any help

I also found this problem. Does this mean that the weight update is not based on the Magnitude-aware gradient with respect to weights method mentioned in the paper. Do you update the weight according to the method of the paper during the training, if you Modified, can you give me a reference because I am not very familiar with C++, thank you very much!

zhangbing123-ops commented 2 years ago

您好,代码没了。能请您再分享一下代码吗?

xiaozhupeiqi666 commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。