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

Function l2normalize

lib/ops.py:14–15  ·  view source on GitHub ↗
(x, axis=1, e=1e-8, keepdims=True)

Source from the content-addressed store, hash-verified

12t_rng = RandomStreams()
13
14def l2normalize(x, axis=1, e=1e-8, keepdims=True):
15 return x/l2norm(x, axis=axis, e=e, keepdims=keepdims)
16
17def l2norm(x, axis=1, e=1e-8, keepdims=True):
18 return T.sqrt(T.sum(T.sqr(x), axis=axis, keepdims=keepdims) + e)

Callers

nothing calls this directly

Calls 1

l2normFunction · 0.85

Tested by

no test coverage detected