View source on GitHub |
Base Export Module.
tfm.core.export_base.ExportModule(
params,
model: Union[tf.Module, tf.keras.Model],
inference_step: Optional[Callable[..., Any]] = None,
*,
preprocessor: Optional[Callable[..., Any]] = None,
postprocessor: Optional[Callable[..., Any]] = None
)
Methods
get_inference_signatures
@abc.abstractmethod
get_inference_signatures( function_keys: Dict[Text, Text] ) -> Mapping[Text, Any]
Get defined function signatures.
serve
@abc.abstractmethod
serve() -> Mapping[Text, tf.Tensor]
The bare inference function which should run on all devices.
Expecting tensors are passed in through keyword arguments. Returns a dictionary of tensors, when the keys will be used inside the SignatureDef.