# tf.keras.backend.resize_images

<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/resize_images) | [![](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#L2771-L2831) |

Resizes the images contained in a 4D tensor.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.keras.backend.resize_images(
        x, height_factor, width_factor, data_format, interpolation='nearest'
    )

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `x` | Tensor or variable to resize. |
| `height_factor` | Positive integer. |
| `width_factor` | Positive integer. |
| `data_format` | One of `"channels_first"`, `"channels_last"`. |
| `interpolation` | A string, one of `nearest` or `bilinear`. |

<br />

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | in case of incorrect value for `data_format` or `interpolation`. |

<br />