| 50 | return T.clip((x + abs(x)) / 2.0, 0., self.clip) |
| 51 | |
| 52 | class LeakyRectify(object): |
| 53 | |
| 54 | def __init__(self, leak=0.2): |
| 55 | self.leak = leak |
| 56 | |
| 57 | def __call__(self, x): |
| 58 | f1 = 0.5 * (1 + self.leak) |
| 59 | f2 = 0.5 * (1 - self.leak) |
| 60 | return f1 * x + f2 * abs(x) |
| 61 | |
| 62 | class Prelu(object): |
| 63 |
nothing calls this directly
no outgoing calls
no test coverage detected