Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

update Spectral Normalization Code #13868

Merged
merged 2 commits into from
Jan 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions example/gluon/sn_gan/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import mxnet as mx
from mxnet import nd
from mxnet import gluon
from mxnet import gluon, autograd
from mxnet.gluon import Block


Expand Down Expand Up @@ -68,7 +68,8 @@ def _spectral_norm(self):
if sigma == 0.:
sigma = EPSILON

self.params.setattr('u', _u)
with autograd.pause():
self.u.set_data(_u)

return w / sigma

Expand Down