christiancosgrove / pytorch-spectral-normalization-gan

Paper by Miyato et al. https://openreview.net/forum?id=B1QRgziT-
MIT License
676 stars 109 forks source link

Can it be used directly on a linear layer? #19

Closed sundyCoder closed 3 years ago

sundyCoder commented 3 years ago

Can it be used directly on a linear layer? e.g., SpectralNorm(Linear(dim, item)

inderjeetnair commented 3 years ago

I guess it can be directly used on linear layers as well. The discriminator architecture in the models.py file itself contains this: self.fc = SpectralNorm(nn.Linear(w_g * w_g * 512, 1))

christiancosgrove commented 3 years ago

Yes, that’s right!