# tf.keras.preprocessing.image.random_brightness

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras-preprocessing/tree/1.1.2/keras_preprocessing/image/affine_transformations.py#L222-L242) |

Performs a random brightness shift.

#### View aliases


**Compat aliases for migration**

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

[`tf.compat.v1.keras.preprocessing.image.random_brightness`](https://www.tensorflow.org/api_docs/python/tf/keras/preprocessing/image/random_brightness)

<br />

    tf.keras.preprocessing.image.random_brightness(
        x, brightness_range
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `x` | Input tensor. Must be 3D. |
| `brightness_range` | Tuple of floats; brightness range. |
| `channel_axis` | Index of axis for channels in the input tensor. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Numpy image tensor. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| ValueError if `brightness_range` isn't a tuple. ||

<br />