<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/core/export_base.py#L28-L96) |

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
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `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. |

<br />

## Methods

### `get_inference_signatures`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/core/export_base.py#L93-L96)

    @abc.abstractmethod
    get_inference_signatures(
        function_keys: Dict[Text, Text]
    ) -> Mapping[Text, Any]

Get defined function signatures.

### `serve`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/core/export_base.py#L85-L91)

    @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.