(X, rate=0.3)
return tf.multiply(X, a)
Apply masking noise to data in X, whereby a fraction `rate` of elements
    of X (chosen at random) is forced to zero.

    Parameters
    ----------
    X : Tensor/Placeholder
        Input to corrupt.
    rate : float
        Fraction of elements to be masked.

    Returns
    -------
    x_corrupted : Tensor
        Input tensor with `rate` fraction of values corrupted.
Apply masking noise to data in X, whereby a fraction `rate` of elements
    of X (chosen at random) is forced to zero.
Apply masking noise to data in X whereby a fraction rate of elements of X ( chosen at random ) is forced to zero .
def masking_noise(X, rate=0.3):
    """Apply masking noise to data in X, whereby a fraction `rate` of elements
    of X (chosen at random) is forced to zero.

    Parameters
    ----------
    X : Tensor/Placeholder
        Input to corrupt.
    rate : float
        Fraction of elements to be masked.

    Returns
    -------
    x_corrupted : Tensor
        Input tensor with `rate` fraction of values corrupted.
    """
    a = binomial(shape=tf.shape(X), p=1 - rate)
    return tf.multiply(X, a)
def masking_noise ( X , rate = 0.3 ) : a = binomial ( shape = tf . shape ( X ) , p = 1 - rate ) return tf . multiply ( X , a )