

def random_binomial(shape, p=0.0, dtype=_FLOATX, seed=None):
    if (seed is None):
        seed = np.random.randint(10000000.0)
    return tf.select((tf.random_uniform(shape, dtype=dtype, seed=seed) <= p), tf.ones(shape), tf.zeros(shape))

dataset/ETHPy150Open fchollet/keras/keras/backend/tensorflow_backend.py random_binomial/original