ModuleSpec
Represents the contents of a Module before it has been instantiated.
A ModuleSpec is the blueprint used by Module to create one or more instances of a specific module in one or more graphs. The details on how to construct the Module are internal to the library implementation but methods to inspect a Module interface are public.
Note: Do not instantiate this class directly. Usehub.load_module_specorhub.create_module_spec.
__init____init__()
Do not instantiate directly.
get_input_info_dictget_input_info_dict(
signature=None,
tags=None
)
Describes the inputs required by a signature.
signature: A string with the signature to get inputs information for. If None, the default signature is used if defined.tags: Optional set of strings, specifying the graph variant to query.A dict from input names to objects that provide (1) a property dtype, (2) a method get_shape() and (3) a read-only boolean property is_sparse. The first two are compatible with the common API of Tensor and SparseTensor objects.
KeyError: if there is no such signature or graph variant.get_output_info_dictget_output_info_dict(
signature=None,
tags=None
)
Describes the outputs provided by a signature.
signature: A string with the signature to get ouputs information for. If None, the default signature is used if defined.tags: Optional set of strings, specifying the graph variant to query.A dict from input names to objects that provide (1) a property dtype, (2) a method get_shape() and (3) a read-only boolean property is_sparse. The first two are compatible with the common API of Tensor and SparseTensor objects.
KeyError: if there is no such signature or graph variant.get_signature_namesget_signature_names(tags=None)
Returns the module's signature names as an iterable of strings.
get_tagsget_tags()
Lists the graph variants as an iterable of set of tags.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/hub/ModuleSpec