Mercurial > pylearn
changeset 1486:cb2e07d99f5a
switched inp==0 to T.eq(inp,0) in peppersalt noise
author | Eric Thibodeau-Laufer <thiboeri@iro.umontreal.ca> |
---|---|
date | Tue, 05 Jul 2011 14:31:10 -0400 |
parents | f7b348e6a98e |
children | 00e7e445939f |
files | pylearn/formulas/noise.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pylearn/formulas/noise.py Tue Jul 05 11:02:15 2011 -0400 +++ b/pylearn/formulas/noise.py Tue Jul 05 14:31:10 2011 -0400 @@ -63,7 +63,7 @@ """ assert inp.dtype in ['float32','float64'] return theano_rng.binomial( size = inp.shape, n = 1, p = 1 - noise_lvl[0], dtype=inp.dtype) * inp \ - + (inp==0) * theano_rng.binomial( size = inp.shape, n = 1, p = noise_lvl[1], dtype=inp.dtype) + + (theano.tensor.eq(inp,0)) * theano_rng.binomial( size = inp.shape, n = 1, p = noise_lvl[1], dtype=inp.dtype) @tags.tags('noise','gauss','gaussian') def gaussian_noise(theano_rng,inp,noise_lvl):