tfds.core.SplitDict
Stay organized with collections
Save and categorize content based on your preferences.
Split info object.
tfds.core.SplitDict(
split_infos: Iterable[SplitInfo], *, dataset_name: Optional[str] = None
)
Attributes |
total_num_examples
|
Return the total number of examples.
|
Methods
from_proto
View source
@classmethod
from_proto(
repeated_split_infos: Iterable[proto_lib.SplitInfo],
filename_template: naming.ShardedFileTemplate
) -> 'SplitDict'
Returns a new SplitDict initialized from the repeated_split_infos
.
merge_multiple
View source
@classmethod
merge_multiple(
split_dicts: List['SplitDict']
) -> 'SplitDict'
to_proto
View source
to_proto()
Returns a list of SplitInfo protos that we have.
update
View source
update(
other
)
D.update([E, ]**F) -> None. Update D from dict/iterable E and F.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]
__getitem__
View source
__getitem__(
key
)
x.getitem(y) <==> x[y]
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.core.SplitDict\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/splits.py#L379-L458) |\n\nSplit info object. \n\n tfds.core.SplitDict(\n split_infos: Iterable[SplitInfo], *, dataset_name: Optional[str] = None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|----------------------|--------------------------------------|\n| `total_num_examples` | Return the total number of examples. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `from_proto`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/splits.py#L417-L430) \n\n @classmethod\n from_proto(\n repeated_split_infos: Iterable[proto_lib.SplitInfo],\n filename_template: naming.ShardedFileTemplate\n ) -\u003e 'SplitDict'\n\nReturns a new SplitDict initialized from the `repeated_split_infos`.\n\n### `merge_multiple`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/splits.py#L441-L458) \n\n @classmethod\n merge_multiple(\n split_dicts: List['SplitDict']\n ) -\u003e 'SplitDict'\n\n### `to_proto`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/splits.py#L432-L434) \n\n to_proto()\n\nReturns a list of SplitInfo protos that we have.\n\n### `update`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/utils/py_utils.py#L143-L146) \n\n update(\n other\n )\n\nD.update(\\[E, \\]\\*\\*F) -\\\u003e None. Update D from dict/iterable E and F.\nIf E is present and has a .keys() method, then does: for k in E: D\\[k\\] = E\\[k\\]\nIf E is present and lacks a .keys() method, then does: for k, v in E: D\\[k\\] = v\nIn either case, this is followed by: for k in F: D\\[k\\] = F\\[k\\]\n\n### `__getitem__`\n\n[View source](https://github.com/tensorflow/datasets/blob/v4.9.3/tensorflow_datasets/core/splits.py#L400-L415) \n\n __getitem__(\n key\n )\n\nx.**getitem**(y) \\\u003c==\\\u003e x\\[y\\]"]]