<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.10/tensorflow_datasets/core/transform/transform_lib.py#L146-L184) |

Returns a function that applies the given `fn` on the `input_feature`.

    tfds.transform.apply_fn(
        fn: Callable[[Any], Any],
        input_feature: str,
        output_feature: Optional[str] = None
    ) -> ExampleTransformFn

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `fn` | the function to apply. |
| `input_feature` | the name of the feature on which `fn` should be applied. If a nested feature needs to be transformed, then specify it using slashes. For example, to transform feature `b` inside `a`, use `a/b`. |
| `output_feature` | the name of the feature where the result should be stored. If `None`, then `input_feature` will be overridden. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| a function that applies `fn` to `input_feature` field of examples and stores the result in `output_feature`. ||

<br />