TFDS now supports the Croissant 🥐 format! Read the documentation to know more.

tfds.decode.SkipDecoding

View source on GitHub

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.

Args
feature tfds.features.FeatureConnector, the feature to which is applied this transformation.

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.