tfds.transform.apply_fn
Stay organized with collections
Save and categorize content based on your preferences.
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 .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]