# tf.keras.backend.random_binomial

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 1 version](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/backend/random_binomial) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/python/keras/backend.py#L5601-L5624) |

Returns a tensor with random binomial distribution of values.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.keras.backend.random_binomial`](https://www.tensorflow.org/api_docs/python/tf/keras/backend/random_binomial)

<br />

    tf.keras.backend.random_binomial(
        shape, p=0.0, dtype=None, seed=None
    )

The binomial distribution with parameters `n` and `p` is the probability
distribution of the number of successful Bernoulli process. Only supports
`n` = 1 for now.

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `shape` | A tuple of integers, the shape of tensor to create. |
| `p` | A float, `0. <= p <= 1`, probability of binomial distribution. |
| `dtype` | String, dtype of returned tensor. |
| `seed` | Integer, random seed. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor. ||

<br />