Module: hub

TensorFlow Hub Library.


class ImageModuleInfo: A ProtocolMessage

class KerasLayer: Wraps a SavedModel (or a legacy TF1 Hub format) as a Keras Layer.

class LatestModuleExporter: Regularly exports registered modules into timestamped directories.

class Module: Part of a TensorFlow 1 model that can be transferred between models.

class ModuleSpec: Represents the contents of a hub.Module before it has been instantiated.


add_signature(...): Adds a signature to the module definition.

attach_image_module_info(...): Attaches an ImageModuleInfo message from within a module_fn.

attach_message(...): Adds an attached message to the module definition.

create_module_spec(...): Creates a ModuleSpec from a function that builds the module's graph.

create_module_spec_from_saved_model(...): Experimental: Create a ModuleSpec out of a SavedModel from TF1.

get_expected_image_size(...): Returns expected [height, width] dimensions of an image input.

get_num_image_channels(...): Returns expected num_channels dimensions of an image input.

image_embedding_column(...): Uses a Module to get a dense 1-D representation from the pixels of images.

load(...): Resolves a handle and loads the resulting module.

load_module_spec(...): Loads a ModuleSpec from a TF Hub service or the filesystem.

register_module_for_export(...): Register a Module to be exported under export_name.

resolve(...): Resolves a module handle into a path.

sparse_text_embedding_column(...): Uses a Module to construct dense representations from sparse text features.

text_embedding_column(...): Uses a Module to construct a dense representation from a text feature.

text_embedding_column_v2(...): Uses a TF2 SavedModel to construct a dense representation from text.