<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/serving/serving_modules.py#L338-L411) |

The export module for the tagging task.

Inherits From: [`ExportModule`](https://www.tensorflow.org/api_docs/python/tfm/core/export_base/ExportModule)

    tfm.nlp.serving_modules.Tagging(
        params, model: tf_keras.Model, inference_step=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 />

## Child Classes

[`class Params`](https://www.tensorflow.org/api_docs/python/tfm/nlp/serving_modules/Tagging/Params)

## Methods

### `get_inference_signatures`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/serving/serving_modules.py#L388-L411)

    get_inference_signatures(
        function_keys: Dict[Text, Text]
    )

Get defined function signatures.

### `serve`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/serving/serving_modules.py#L356-L368)

    @tf.function
    serve(
        input_word_ids, input_mask, input_type_ids
    ) -> Dict[str, tf.Tensor]

### `serve_examples`

[View source](https://github.com/tensorflow/models/blob/v2.20.0/official/nlp/serving/serving_modules.py#L370-L386)

    @tf.function
    serve_examples(
        inputs
    ) -> Dict[str, tf.Tensor]