<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/visualization/show_examples.py#L94-L150) |

Visualize images (and labels) from an image classification dataset.

#### View aliases


**Main aliases**

[`tfds.show_examples`](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)

<br />

    tfds.visualization.show_examples(
        ds: _Dataset,
        ds_info: dataset_info.DatasetInfo,
        is_batched: bool = False,
        **options_kwargs
    )

### Used in the notebooks

| Used in the tutorials |
|---|
| - [TensorFlow Datasets](https://www.tensorflow.org/datasets/overview) - [Fine tuning models for plant disease detection](https://www.tensorflow.org/hub/tutorials/cropnet_on_device) |

This function is for interactive use (Colab, Jupyter). It displays and return
a plot of (rows\*columns) images from a tf.data.Dataset.

#### Usage:

    ds, ds_info = tfds.load('cifar10', split='train', with_info=True)
    fig = tfds.show_examples(ds, ds_info)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `ds` | [`tf.data.Dataset`](https://www.tensorflow.org/api_docs/python/tf/data/Dataset). The tf.data.Dataset object to visualize. Examples should not be batched. Examples will be consumed in order until (rows \* cols) are read or the dataset is consumed. |
| `ds_info` | The dataset info object to which extract the label and features info. Available either through `tfds.load('mnist', with_info=True)` or `tfds.builder('mnist').info` |
| `is_batched` | Whether the data is batched. |
| `**options_kwargs` | Additional display options, specific to the dataset type to visualize. Are forwarded to [`tfds.visualization.Visualizer.show`](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/Visualizer#show). See the [`tfds.visualization`](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization) for a list of available visualizers. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| `fig` | The `matplotlib.Figure` object |

<br />