tf.keras.backend.random_bernoulli

Returns a tensor with random bernoulli distribution of values.

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.keras.backend.random_bernoulli

shape A tuple of integers, the shape of tensor to create.
p A float, 0. <= p <= 1, probability of bernoulli distribution.
dtype String, dtype of returned tensor.
seed Integer, random seed.

A tensor.