Module: tf.compat.v1.keras.utils

Public Keras utilities.

Classes

class CustomObjectScope: Exposes custom classes/functions to Keras deserialization internals.

class DeterministicRandomTestTool: DeterministicRandomTestTool is a testing tool.

class GeneratorEnqueuer: Builds a queue out of a data generator.

class OrderedEnqueuer: Builds a Enqueuer from a Sequence.

class Progbar: Displays a progress bar.

class Sequence: Base object for fitting to a sequence of data, such as a dataset.

class SequenceEnqueuer: Base class to enqueue inputs.

class custom_object_scope: Exposes custom classes/functions to Keras deserialization internals.

Functions

array_to_img(...): Converts a 3D Numpy array to a PIL Image instance.

deserialize_keras_object(...): Turns the serialized form of a Keras object back into an actual object.

disable_interactive_logging(...): Turn off interactive logging.

enable_interactive_logging(...): Turn on interactive logging.

get_custom_objects(...): Retrieves a live reference to the global dictionary of custom objects.

get_file(...): Downloads a file from a URL if it not already in the cache.

get_or_create_layer(...): Use this method to track nested keras models in a shim-decorated method.

get_registered_name(...): Returns the name registered to an object within the Keras framework.

get_registered_object(...): Returns the class associated with name if it is registered with Keras.

get_source_inputs(...): Returns the list of input tensors necessary to compute tensor.

img_to_array(...): Converts a PIL Image instance to a Numpy array.

is_interactive_logging_enabled(...): Check if interactive logging is enabled.

load_img(...): Loads an image into PIL format.

model_to_dot(...): Convert a Keras model to dot format.

normalize(...): Normalizes a Numpy array.

pad_sequences(...): Pads sequences to the same length.

plot_model(...): Converts a Keras model to dot format and save to a file.

register_keras_serializable(...): Registers an object with the Keras serialization framework.

save_img(...): Saves an image stored as a Numpy array to a path or file object.

serialize_keras_object(...): Serialize a Keras object into a JSON-compatible representation.

to_categorical(...): Converts a class vector (integers) to binary class matrix.

track_tf1_style_variables(...): Wrap layer & module methods in this decorator to capture tf1-style weights.

warmstart_embedding_matrix(...): Warm start embedding matrix with changing vocab.