Mercurial > pylearn
view noise.py @ 457:34acf8db186d
Deprecated pylearn.nnet_ops.
Use theano.sandbox.nnet_ops instead.
author | Joseph Turian <turian@iro.umontreal.ca> |
---|---|
date | Tue, 07 Oct 2008 18:21:32 -0400 |
parents | 643dbccde1fc |
children |
line wrap: on
line source
def binomial(input, rstate, p = 0.75): """ Op to corrupt an input with binomial noise. Generate a noise vector of 1's and 0's (1 with probability p). We multiply this by the input. @note: See U{ssh://projects@lgcm.iro.umontreal.ca/repos/denoising_aa} to see how rstate is used. """ noise = rstate.gen_like(('binomial',{'p': p, 'n': 1}), input) noise.name = 'noise' return noise * input