Exemplo n.º 1
0
 def NRect(x, rng=None, use_noise=False, std=0.05):
     assert rng is not None
     if use_noise:
         x = x + rng.normal(x.shape, avg=0.0, std=std, dtype=x.dtype)
     return Trect(x)
Exemplo n.º 2
0
 def NReLU(x, rng=None, use_noise=False):
     assert rng is not None
     if use_noise:
         stds = Sigmoid(x)
         x = x + rng.normal(x.shape, avg=0.0, std=stds, dtype=x.dtype)
     return Trect(x)