MCPcopy
hub / github.com/hanzhanggit/StackGAN / ortho_weight

Function ortho_weight

misc/skipthoughts.py:327–330  ·  view source on GitHub ↗
(ndim)

Source from the content-addressed store, hash-verified

325
326# some utilities
327def ortho_weight(ndim):
328 W = numpy.random.randn(ndim, ndim)
329 u, s, v = numpy.linalg.svd(W)
330 return u.astype('float32')
331
332
333def norm_weight(nin,nout=None, scale=0.1, ortho=True):

Callers 2

norm_weightFunction · 0.85
param_init_gruFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected