MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / __call__

Method __call__

lib/inits.py:96–103  ·  view source on GitHub ↗
(self, shape, name=None)

Source from the content-addressed store, hash-verified

94 pass
95
96 def __call__(self, shape, name=None):
97 if len(shape) == 2:
98 scale = np.sqrt(2./shape[0])
99 elif len(shape) == 4:
100 scale = np.sqrt(2./np.prod(shape[1:]))
101 else:
102 raise NotImplementedError
103 return sharedX(np_rng.normal(size=shape, scale=scale), name=name)

Callers

nothing calls this directly

Calls 1

sharedXFunction · 0.90

Tested by

no test coverage detected