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
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.
|
Returns |
a function that applies fn to input_feature field of examples and stores
the result in output_feature .
|