View source on GitHub |
The export module for the translation task.
Inherits From: ExportModule
tfm.nlp.serving_modules.Translation(
params, model: tf.keras.Model, inference_step=None
)
Child Classes
Methods
get_inference_signatures
get_inference_signatures(
function_keys: Dict[Text, Text]
)
Get defined function signatures.
serve
@tf.function
serve( inputs ) -> Dict[str, tf.Tensor]
serve_text
@tf.function
serve_text( text: tf.Tensor ) -> Dict[str, tf.Tensor]