src/actrec.py
def dropout_layer(state_before, use_noise, trng):
    """
    tensor switch is like an if statement that checks the
    value of the theano shared variable (use_noise), before
    either dropping out the state_before tensor or
    computing the appropriate activation. During training/testing
    use_noise is toggled on and off.
    """
    p=0.5
    proj = tensor.switch(use_noise,
                         state_before *
                         trng.binomial(state_before.shape, p=0.5, n=1, dtype=state_before.dtype),
                         state_before * p)
    """
    looks like multiplicative gaussian noise works better than
    Bernoulli dropout 
    """
    #proj = tensor.switch(use_noise,
     #                    state_before *
      #                   trng.normal(state_before.shape, 1, 1, dtype=state_before.dtype),
       #                  state_before)
    return proj

    tensor switch is like an if statement that checks the
    value of the theano shared variable (use_noise), before
    either dropping out the state_before tensor or
    computing the appropriate activation. During training/testing
    use_noise is toggled on and off.
    
tensor switch is like an if statement that checks the
value of the theano shared variable (use_noise), before
either dropping out the state_before tensor or
computing the appropriate activation. During training/testing
use_noise is toggled on and off.
tensor switch is like an if statement that checks the value of the theano shared variable ( use_noise ) before either dropping out the state_before tensor or computing the appropriate activation . During training / testing use_noise is toggled on and off .
def dropout_layer(state_before, use_noise, trng):
    p=0.5
    proj = tensor.switch(use_noise,
                         state_before *
                         trng.binomial(state_before.shape, p=0.5, n=1, dtype=state_before.dtype),
                         state_before * p)
    return proj
def dropout_layer ( state_before , use_noise , trng ) : p = 0.5 proj = tensor . switch ( use_noise , state_before * trng . binomial ( state_before . shape , p = 0.5 , n = 1 , dtype = state_before . dtype ) , state_before * p ) """
    looks like multiplicative gaussian noise works better than
    Bernoulli dropout 
    """ return proj
tensor switch is like an if statement that checks the
value of the theano shared variable (use_noise), before
either dropping out the state_before tensor or
computing the appropriate activation.
tensor switch is like an if statement that checks the value of the theano shared variable ( use_noise ) before either dropping out the state_before tensor or computing the appropriate activation .
"""
    tensor switch is like an if statement that checks the
    value of the theano shared variable (use_noise), before
    either dropping out the state_before tensor or
    computing the appropriate activation. During training/testing
    use_noise is toggled on and off.
    """ """
    looks like multiplicative gaussian noise works better than
    Bernoulli dropout 
    """ #proj = tensor.switch(use_noise, #                    state_before * #                   trng.normal(state_before.shape, 1, 1, dtype=state_before.dtype), #                  state_before)
state_before
use_noise
trng