tfds.core.DatasetCollectionLoader

Loader class for dataset collections.

collection the DatasetCollection to load.
requested_version optional version of the dataset collection to load. If none given, the latest version will be loaded.
loader_kwargs optional kwargs for the tfds.load function.
datasets initialized post-init, defines the datasets comprised in the requested dataset collection.
collection_name the name of the DatasetCollection to load.

Methods

get_dataset_info

View source

load_all_datasets

View source

Loads all datasets of a collection.

Args
split which split(s) of the datasets to load.
loader_kwargs dict (optional), keyword arguments to be passed to the tfds.load function. Refer to tfds.load documentation for a comperehensive overview of the different loading options.

Returns
dict of dataset_names mapping to a dict of {split_name: tf.data.Dataset} for each desired datasets.

load_dataset

View source

Loads the named dataset from a dataset collection by calling tfds.load.

Args
dataset str, the dataset name to load.
split which split(s) of the dataset to load. If None, will return all splits available for the dataset.
loader_kwargs dict (optional), keyword arguments to be passed to the tfds.load function. Refer to tfds.load documentation for a comperehensive overview of the different loading options.

Returns
A dict of {str: tf.data.Dataset} for the desided dataset.

Raises
KeyError if trying to load a dataset not included in the collection.
RuntimeError if load return type is not a dict or a list.

load_datasets

View source

Loads a number of datasets from the dataset collection.

Args
datasets dataset names to load.
split which split(s) of the datasets to load.
loader_kwargs keyword arguments to be passed to the tfds.load function. Refer to tfds.load documentation for a comperehensive overview of the different loading options.

Returns
mapping between a dataset name and a mapping of split name to tf.data.Dataset for each requested dataset.

Raises
ValueError if no dataset(s) to load are given.

View source

View source

Prints information about this dataset collection.

set_loader_kwargs

View source

__eq__

loader_kwargs None
requested_version None