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

Function norm_weight

misc/skipthoughts.py:333–340  ·  view source on GitHub ↗
(nin,nout=None, scale=0.1, ortho=True)

Source from the content-addressed store, hash-verified

331
332
333def norm_weight(nin,nout=None, scale=0.1, ortho=True):
334 if nout == None:
335 nout = nin
336 if nout == nin and ortho:
337 W = ortho_weight(nin)
338 else:
339 W = numpy.random.uniform(low=-scale, high=scale, size=(nin, nout))
340 return W.astype('float32')
341
342
343def param_init_gru(options, params, prefix='gru', nin=None, dim=None):

Callers 3

init_paramsFunction · 0.85
init_params_biFunction · 0.85
param_init_gruFunction · 0.85

Calls 1

ortho_weightFunction · 0.85

Tested by

no test coverage detected