tfds.core.DatasetCollectionLoader
Stay organized with collections
Save and categorize content based on your preferences.
Loader class for dataset collections.
tfds.core.DatasetCollectionLoader(
collection: dataset_collection_builder.DatasetCollection,
requested_version: Optional[str] = None,
loader_kwargs: Optional[Dict[str, Any]] = None
)
Attributes |
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
get_dataset_info(
dataset_name: str
)
load_all_datasets
View source
load_all_datasets(
split: Optional[Tree[splits_lib.SplitArg]] = None,
loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, Mapping[str, tf.data.Dataset]]
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
load_dataset(
dataset: str,
split: Optional[Tree[splits_lib.SplitArg]] = None,
loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, tf.data.Dataset]
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
load_datasets(
datasets: Iterable[str],
split: Optional[Tree[splits_lib.SplitArg]] = None,
loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, Mapping[str, tf.data.Dataset]]
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.
|
print_datasets
View source
print_datasets() -> None
print_info
View source
print_info() -> None
Prints information about this dataset collection.
set_loader_kwargs
View source
set_loader_kwargs(
loader_kwargs: Dict[str, Any]
)
__eq__
__eq__(
other
)
Class Variables |
loader_kwargs
|
None
|
requested_version
|
None
|
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."],[],[]]