(state_before, use_noise, trng)
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):
    """
    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.
    """
    proj = tensor.switch(use_noise,
                         state_before *
                         trng.binomial(state_before.shape, p=0.5, n=1, dtype=state_before.dtype),
                         state_before * 0.5)
    return proj
def dropout_layer ( state_before , use_noise , trng ) : proj = tensor . switch ( use_noise , state_before * trng . binomial ( state_before . shape , p = 0.5 , n = 1 , dtype = state_before . dtype ) , state_before * 0.5 ) return proj