View source on GitHub |
InputCreator with tensor type specs.
Inherits From: InputCreator
tfr.keras.model.TypeSpecInputCreator(
type_spec: Dict[str, Union[tf.TensorSpec, tf.RaggedTensorSpec]],
context_feature_names: Optional[List[str]] = None,
example_feature_names: Optional[List[str]] = None
)
Example usage:
input_creator=TypeSpecInputCreator(
{"example_feature_1": tf.TensorSpec(shape=[None, 1], dtype=tf.float32)},
example_feature_names=["example_feature_1"])
Methods
__call__
__call__() -> Tuple[tfr.keras.model.TensorDict
, tfr.keras.model.TensorDict
]
See InputCreator
.