Google I/O is a wrap! Catch up on TensorFlow sessions View sessions

tfm.nlp.serving_modules.SentencePrediction

The export module for the sentence prediction 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_examples

View source

serve_probability

View source

serve_text_examples

View source