# Module: tf.keras.utils

<br />

|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/keras/utils) |

Keras utilities.

#### View aliases


**Compat aliases for migration**

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

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

<br />

## Classes

[`class CustomObjectScope`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/CustomObjectScope): Provides a scope that changes to `_GLOBAL_CUSTOM_OBJECTS` cannot escape.

[`class GeneratorEnqueuer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/GeneratorEnqueuer): Builds a queue out of a data generator.

[`class HDF5Matrix`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/HDF5Matrix): Representation of HDF5 dataset to be used instead of a Numpy array.

[`class OrderedEnqueuer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/OrderedEnqueuer): Builds a Enqueuer from a Sequence.

[`class Progbar`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/Progbar): Displays a progress bar.

[`class Sequence`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/Sequence): Base object for fitting to a sequence of data, such as a dataset.

[`class SequenceEnqueuer`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/SequenceEnqueuer): Base class to enqueue inputs.

## Functions

[`convert_all_kernels_in_model(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/convert_all_kernels_in_model): Converts all convolution kernels in a model from Theano to TensorFlow.

[`custom_object_scope(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/custom_object_scope): Provides a scope that changes to `_GLOBAL_CUSTOM_OBJECTS` cannot escape.

[`deserialize_keras_object(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/deserialize_keras_object)

[`get_custom_objects(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/get_custom_objects): Retrieves a live reference to the global dictionary of custom objects.

[`get_file(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/get_file): Downloads a file from a URL if it not already in the cache.

[`get_source_inputs(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/get_source_inputs): Returns the list of input tensors necessary to compute `tensor`.

[`model_to_dot(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/model_to_dot): Convert a Keras model to dot format.

[`multi_gpu_model(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/multi_gpu_model): Replicates a model on different GPUs.

[`normalize(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/normalize): Normalizes a Numpy array.

[`plot_model(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/plot_model): Converts a Keras model to dot format and save to a file.

[`serialize_keras_object(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/serialize_keras_object)

[`to_categorical(...)`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/keras/utils/to_categorical): Converts a class vector (integers) to binary class matrix.