# tf.contrib.layers.images_to_sequence

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/layers/python/layers/layers.py#L2336-L2368) |

Convert a batch of images into a batch of sequences.

    tf.contrib.layers.images_to_sequence(
        inputs, data_format=DATA_FORMAT_NHWC, outputs_collections=None, scope=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `inputs` | a (num_images, height, width, depth) tensor |
| `data_format` | A string. `NHWC` (default) and `NCHW` are supported. |
| `outputs_collections` | The collections to which the outputs are added. |
| `scope` | Optional scope for name_scope. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If `data_format` is not either NCHW or NHWC. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| (width, num_images\*height, depth) sequence tensor ||

<br />