tfds.transform.apply_do_fn
Stay organized with collections
Save and categorize content based on your preferences.
Applies fn
that can return any number of examples based on an input.
tfds.transform.apply_do_fn(
fn: Callable[[Any], Iterator[Any]]
) -> ExampleTransformFn
A do_fn can be used for multiple purposes such as augmentations, but also to
filter examples.
Arguments |
fn
|
the function that takes an example and outputs 0 or more examples.
|
Returns |
function that can be applied to perform a do fn.
|
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.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfds.transform.apply_do_fn\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/transform/transform_lib.py#L228-L242) |\n\nApplies `fn` that can return any number of examples based on an input. \n\n tfds.transform.apply_do_fn(\n fn: Callable[[Any], Iterator[Any]]\n ) -\u003e ExampleTransformFn\n\nA do_fn can be used for multiple purposes such as augmentations, but also to\nfilter examples.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Arguments --------- ||\n|------|--------------------------------------------------------------------|\n| `fn` | the function that takes an example and outputs 0 or more examples. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| function that can be applied to perform a do fn. ||\n\n\u003cbr /\u003e"]]