eladhoffer / quantized.pytorch

MIT License
212 stars 57 forks source link

Cheating when applying add operation in ResNet #11

Open isomov opened 5 years ago

isomov commented 5 years ago

Hi! It seems to me as a cheat when preforming '+' operation at the end of residual block in quantized ResNet implementation. It requires 16 bit accumulator to get the outputs of sum, also input tensors ought to be quantized. What we get is that this op inputs are 32 bit (res input) and 16 bit (after last qconv) and the result is 32 bit, so, the accuracy doesn't fall at all.