christiancosgrove / pytorch-spectral-normalization-gan

Paper by Miyato et al. https://openreview.net/forum?id=B1QRgziT-

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

does it use w_bar when update u and v?

Zzlongjuanfeng opened this issue · comments

in the function _update_u_v(self), does it use w_bar rather than w to update u and v? I mean, should i replace w = getattr(self.module, self.name + '_bar') with w = getattr(self.module, self.name).

emmm, not yet. But in the pytorch Implementation, they use the most recent w beacuse they update the weight itself in the line 33.

you're not supposed to update the weight itself, you're supposed to re-normalize the value everytime before using it, without saving the normalization. See Algorithm 1, p15 of the paper