code: def _spectral_norm(self):
          
          w = self.params.get('weight').data(self.ctx)
          w_mat = nd.reshape(w, [w.shape[0], -1])
  
          _u = self.u.data(self.ctx)
          _v = None
  
          for _ in range(POWER_ITERATION):
              _v = nd.L2Normalization(nd.dot(_u, w_mat))
              _u = nd.L2Normalization(nd.dot(_v, w_mat.T))
  
          sigma = nd.sum(nd.dot(_u, w_mat) * _v)
          if sigma == 0.:
              sigma = EPSILON
  
          with autograd.pause():
              self.u.set_data(_u)
  
          return w / sigma
docs: spectral normalization