tfm.nlp.serving_modules.Translation

The export module for the translation task.

Inherits From: ExportModule

params A dataclass for parameters to the module.
model A model instance which contains weights and forward computation.
inference_step An optional callable to forward-pass the model. If not specified, it creates a parital function with model as an required kwarg.
preprocessor An optional callable to preprocess the inputs.
postprocessor An optional callable to postprocess the model outputs.

Child Classes

class Params

Methods

get_inference_signatures

View source

Get defined function signatures.

serve

View source

serve_text

View source