ZouJiu1 / LSQplus

LSQ+ or LSQplus
57 stars 14 forks source link

What's the function about the variable 'self.g' in lsqplus_quantiza_V1.py #2

Closed huanmei9 closed 2 years ago

huanmei9 commented 2 years ago

Thanks for your open source work. There is an initalization variable self.g in _lsqqlus_quantizaV1.py:L138, I'm wondering the usage of it. Looking forward to your reply.

ZouJiu1 commented 2 years ago

It's used to keep the gradient update rating of self.s and self.b, if you drop this parameter, you will find that the update of self.s and self.b become unstable. Self.g keep the update rating same as NN'weight. So it is necessary for convergence.