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

Class ClippedRectify

lib/activations.py:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 return (x + abs(x)) / 2.0
43
44class ClippedRectify(object):
45
46 def __init__(self, clip=10.):
47 self.clip = clip
48
49 def __call__(self, x):
50 return T.clip((x + abs(x)) / 2.0, 0., self.clip)
51
52class LeakyRectify(object):
53

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected