Mercurial > pylearn
changeset 1327:9a7dbcd0ebcf
make function documentation more clear.
author | Frederic Bastien <nouiz@nouiz.org> |
---|---|
date | Wed, 13 Oct 2010 15:05:16 -0400 |
parents | 1b97fae7ea0d |
children | 63fe96ede21d |
files | pylearn/formulas/noise.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pylearn/formulas/noise.py Wed Oct 13 15:04:42 2010 -0400 +++ b/pylearn/formulas/noise.py Wed Oct 13 15:05:16 2010 -0400 @@ -56,7 +56,10 @@ :type inp: Theano variable :param inp: The input that we want to add noise :type noise_lvl: tuple(float,float) - :param noise_lvl: The %% of noise for the salt and pepper. Between 0 (no noise) and 1. + :param noise_lvl: The probability of changing each element to zero or one. + (prob of salt, prob of pepper) + + :note: The sum of the prob of salt and prob of pepper should be less then 1. """ assert inp.dtype in ['float32','float64'] return theano_rng.binomial( size = inp.shape, n = 1, p = 1 - noise_lvl[0], dtype=inp.dtype) * inp \