• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# ==============================================================================
15"""Experimental API for building input pipelines.
16
17This module contains experimental `Dataset` sources and transformations that can
18be used in conjunction with the `tf.data.Dataset` API. Note that the
19`tf.data.experimental` API is not subject to the same backwards compatibility
20guarantees as `tf.data`, but we will provide deprecation advice in advance of
21removing existing functionality.
22
23See [Importing Data](https://tensorflow.org/guide/datasets) for an overview.
24
25@@AutoShardPolicy
26@@AutotuneAlgorithm
27@@AutotuneOptions
28@@CheckpointInputPipelineHook
29@@Counter
30@@CsvDataset
31@@DatasetInitializer
32@@DatasetStructure
33@@DistributeOptions
34@@ExternalStatePolicy
35@@OptimizationOptions
36@@Optional
37@@OptionalStructure
38@@RaggedTensorStructure
39@@RandomDataset
40@@Reducer
41@@SparseTensorStructure
42@@SqlDataset
43@@Structure
44@@TFRecordWriter
45@@TensorArrayStructure
46@@TensorStructure
47@@ThreadingOptions
48
49@@assert_cardinality
50@@bucket_by_sequence_length
51@@cardinality
52@@choose_from_datasets
53@@copy_to_device
54@@dense_to_ragged_batch
55@@dense_to_sparse_batch
56@@distribute
57@@enable_debug_mode
58@@enumerate_dataset
59@@from_list
60@@from_variant
61@@get_next_as_optional
62@@get_single_element
63@@get_structure
64@@group_by_reducer
65@@group_by_window
66@@ignore_errors
67@@index_table_from_dataset
68@@load
69@@make_batched_features_dataset
70@@make_csv_dataset
71@@make_saveable_from_iterator
72@@map_and_batch
73@@map_and_batch_with_legacy_function
74@@parallel_interleave
75@@parse_example_dataset
76@@prefetch_to_device
77@@rejection_resample
78@@sample_from_datasets
79@@save
80@@scan
81@@shuffle_and_repeat
82@@snapshot
83@@table_from_dataset
84@@take_while
85@@to_variant
86@@unbatch
87@@unique
88
89@@AUTOTUNE
90@@INFINITE_CARDINALITY
91@@SHARD_HINT
92@@UNKNOWN_CARDINALITY
93"""
94
95# pylint: disable=unused-import
96from tensorflow.python.data.experimental import service
97from tensorflow.python.data.experimental.ops.batching import dense_to_ragged_batch
98from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch
99from tensorflow.python.data.experimental.ops.batching import map_and_batch
100from tensorflow.python.data.experimental.ops.batching import map_and_batch_with_legacy_function
101from tensorflow.python.data.experimental.ops.batching import unbatch
102from tensorflow.python.data.experimental.ops.cardinality import assert_cardinality
103from tensorflow.python.data.experimental.ops.cardinality import cardinality
104from tensorflow.python.data.experimental.ops.cardinality import INFINITE as INFINITE_CARDINALITY
105from tensorflow.python.data.experimental.ops.cardinality import UNKNOWN as UNKNOWN_CARDINALITY
106from tensorflow.python.data.experimental.ops.counter import Counter
107from tensorflow.python.data.experimental.ops.distribute import SHARD_HINT
108from tensorflow.python.data.experimental.ops.enumerate_ops import enumerate_dataset
109from tensorflow.python.data.experimental.ops.error_ops import ignore_errors
110from tensorflow.python.data.experimental.ops.from_list import from_list
111from tensorflow.python.data.experimental.ops.get_single_element import get_single_element
112from tensorflow.python.data.experimental.ops.grouping import bucket_by_sequence_length
113from tensorflow.python.data.experimental.ops.grouping import group_by_reducer
114from tensorflow.python.data.experimental.ops.grouping import group_by_window
115from tensorflow.python.data.experimental.ops.grouping import Reducer
116from tensorflow.python.data.experimental.ops.interleave_ops import choose_from_datasets
117from tensorflow.python.data.experimental.ops.interleave_ops import parallel_interleave
118from tensorflow.python.data.experimental.ops.interleave_ops import sample_from_datasets
119from tensorflow.python.data.experimental.ops.io import load
120from tensorflow.python.data.experimental.ops.io import save
121from tensorflow.python.data.experimental.ops.iterator_ops import CheckpointInputPipelineHook
122from tensorflow.python.data.experimental.ops.iterator_ops import make_saveable_from_iterator
123from tensorflow.python.data.experimental.ops.lookup_ops import DatasetInitializer
124from tensorflow.python.data.experimental.ops.lookup_ops import index_table_from_dataset
125from tensorflow.python.data.experimental.ops.lookup_ops import table_from_dataset
126from tensorflow.python.data.experimental.ops.parsing_ops import parse_example_dataset
127from tensorflow.python.data.experimental.ops.prefetching_ops import copy_to_device
128from tensorflow.python.data.experimental.ops.prefetching_ops import prefetch_to_device
129from tensorflow.python.data.experimental.ops.random_ops import RandomDataset
130from tensorflow.python.data.experimental.ops.readers import CsvDataset
131from tensorflow.python.data.experimental.ops.readers import make_batched_features_dataset
132from tensorflow.python.data.experimental.ops.readers import make_csv_dataset
133from tensorflow.python.data.experimental.ops.readers import SqlDataset
134from tensorflow.python.data.experimental.ops.resampling import rejection_resample
135from tensorflow.python.data.experimental.ops.scan_ops import scan
136from tensorflow.python.data.experimental.ops.shuffle_ops import shuffle_and_repeat
137from tensorflow.python.data.experimental.ops.snapshot import snapshot
138from tensorflow.python.data.experimental.ops.take_while_ops import take_while
139from tensorflow.python.data.experimental.ops.unique import unique
140from tensorflow.python.data.experimental.ops.writers import TFRecordWriter
141from tensorflow.python.data.ops.dataset_ops import AUTOTUNE
142from tensorflow.python.data.ops.dataset_ops import DatasetSpec as DatasetStructure
143from tensorflow.python.data.ops.dataset_ops import enable_debug_mode
144from tensorflow.python.data.ops.dataset_ops import from_variant
145from tensorflow.python.data.ops.dataset_ops import get_structure
146from tensorflow.python.data.ops.dataset_ops import to_variant
147from tensorflow.python.data.ops.iterator_ops import get_next_as_optional
148from tensorflow.python.data.ops.optional_ops import Optional
149from tensorflow.python.data.ops.optional_ops import OptionalSpec as OptionalStructure
150from tensorflow.python.data.ops.options import AutoShardPolicy
151from tensorflow.python.data.ops.options import AutotuneAlgorithm
152from tensorflow.python.data.ops.options import AutotuneOptions
153from tensorflow.python.data.ops.options import DistributeOptions
154from tensorflow.python.data.ops.options import ExternalStatePolicy
155from tensorflow.python.data.ops.options import OptimizationOptions
156from tensorflow.python.data.ops.options import ThreadingOptions
157from tensorflow.python.data.util.structure import _RaggedTensorStructure as RaggedTensorStructure
158from tensorflow.python.data.util.structure import _SparseTensorStructure as SparseTensorStructure
159from tensorflow.python.data.util.structure import _TensorArrayStructure as TensorArrayStructure
160from tensorflow.python.data.util.structure import _TensorStructure as TensorStructure
161from tensorflow.python.framework.type_spec import TypeSpec as Structure
162# pylint: enable=unused-import
163
164from tensorflow.python.util.all_util import remove_undocumented
165
166_allowed_symbols = [
167    "service",
168]
169
170remove_undocumented(__name__, _allowed_symbols)
171