tfds.decode.SkipDecoding
Stay organized with collections
Save and categorize content based on your preferences.
Transformation which skip the decoding entirelly.
Inherits From: Decoder
tfds.decode.SkipDecoding()
Example of usage:
ds = tfds.load(
'imagenet2012',
split='train',
decoders={
'image': tfds.decode.SkipDecoding(),
}
)
for ex in ds.take(1):
assert ex['image'].dtype == tf.string
Attributes |
dtype
|
Returns the dtype after decoding.
|
feature
|
|
Methods
decode_batch_example
View source
decode_batch_example(
serialized_example
)
See FeatureConnector.decode_batch_example
for details.
decode_example
View source
decode_example(
serialized_example
)
Forward the serialized feature field.
decode_example_np
View source
decode_example_np(
serialized_example
)
Forward the serialized feature field.
decode_ragged_example
View source
decode_ragged_example(
serialized_example
)
See FeatureConnector.decode_ragged_example
for details.
setup
View source
setup(
*, feature
)
Transformation contructor.
The initialization of decode object is deferred because the objects only
know the builder/features on which it is used after it has been
constructed, the initialization is done in this function.
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.decode.SkipDecoding\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L104-L134) |\n\nTransformation which skip the decoding entirelly.\n\nInherits From: [`Decoder`](../../tfds/decode/Decoder) \n\n tfds.decode.SkipDecoding()\n\n#### Example of usage:\n\n ds = tfds.load(\n 'imagenet2012',\n split='train',\n decoders={\n 'image': tfds.decode.SkipDecoding(),\n }\n )\n\n for ex in ds.take(1):\n assert ex['image'].dtype == tf.string\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|-----------|-------------------------------------|\n| `dtype` | Returns the `dtype` after decoding. |\n| `feature` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `decode_batch_example`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L87-L95) \n\n decode_batch_example(\n serialized_example\n )\n\nSee [`FeatureConnector.decode_batch_example`](../../tfds/features/FeatureConnector#decode_batch_example) for details.\n\n### `decode_example`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L128-L130) \n\n decode_example(\n serialized_example\n )\n\nForward the serialized feature field.\n\n### `decode_example_np`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L132-L134) \n\n decode_example_np(\n serialized_example\n )\n\nForward the serialized feature field.\n\n### `decode_ragged_example`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L97-L101) \n\n decode_ragged_example(\n serialized_example\n )\n\nSee [`FeatureConnector.decode_ragged_example`](../../tfds/features/FeatureConnector#decode_ragged_example) for details.\n\n### `setup`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/decode/base.py#L55-L66) \n\n setup(\n *, feature\n )\n\nTransformation contructor.\n\nThe initialization of decode object is deferred because the objects only\nknow the builder/features on which it is used after it has been\nconstructed, the initialization is done in this function.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-----------|--------------------------------------------------------------------------------------------------------------------------------|\n| `feature` | [`tfds.features.FeatureConnector`](../../tfds/features/FeatureConnector), the feature to which is applied this transformation. |\n\n\u003cbr /\u003e"]]