yhhhli / APoT_Quantization

PyTorch implementation for the APoT quantization (ICLR 2020)
265 stars 51 forks source link

Differences between quant_layer.py #9

Open zhangchuanyi96 opened 4 years ago

zhangchuanyi96 commented 4 years ago

Thanks for your nice work and codes!

I found that files _quant_layer.py_ in CIFAR10 and ImageNet are different. Can you please tell me why there exit two versions? BTW, I plan to utilize quantlize MobileNet V2. Which version is better for migration? Thank you.

yhhhli commented 4 years ago

Hi,

_quantlayer.py in CIFAR10 is odder one. You are supposed to use ImageNet folder. BTW, if you correctly migrate our code to MobileNetV2, you could merge to this branch!

Thanks.

zhangchuanyi96 commented 4 years ago

Thanks for your reply. I'll try~

kuny1240 commented 4 years ago

Hi,

_quantlayer.py in CIFAR10 is odder one. You are supposed to use ImageNet folder. BTW, if you correctly migrate our code to MobileNetV2, you could merge to this branch!

Thanks.

Hi,

I noticed that the difference between quant_layer.py is that the CIFAR10 one has backward path in the self-defined Pytorch function, but the ImageNet one doesn't. Does this mean that the Pytorch is strong enough to self-compute the backward gradient of RCF?

Thank you very much!

yhhhli commented 4 years ago

yes, you are right.

kuny1240 commented 4 years ago

Thank you for your reply!