/external/tensorflow/tensorflow/core/kernels/data/ |
map_dataset_op.cc | 19 #include "tensorflow/core/kernels/data/dataset.h" 53 *output = new Dataset(ctx, input, func_, std::move(captured_func), 58 class Dataset : public GraphDatasetBase { 60 Dataset(OpKernelContext* ctx, const DatasetBase* input, 74 ~Dataset() override { input_->Unref(); } 89 string DebugString() override { return "MapDatasetOp::Dataset"; } 123 class Iterator : public DatasetIterator<Dataset> { 126 : DatasetIterator<Dataset>(params), 127 input_impl_(params.dataset->input_->MakeIterator(params.prefix)) {} 146 dataset()->captured_func_->Run(ctx, std::move(args), out_tensors) [all...] |
unique_dataset_op.cc | 17 #include "tensorflow/core/kernels/data/dataset.h" 46 *output = new Dataset(ctx, input); 50 class Dataset : public GraphDatasetBase { 52 Dataset(OpKernelContext* ctx, const DatasetBase* input) 57 ~Dataset() override { input_->Unref(); } 74 return strings::StrCat("UniqueDatasetOp::Dataset"); 87 class Iterator : public DatasetIterator<Dataset> { 90 : DatasetIterator<Dataset>(params), 91 input_impl_(params.dataset->input_->MakeIterator(params.prefix)) {}
|
flat_map_dataset_op.cc | 19 #include "tensorflow/core/kernels/data/dataset.h" 54 *output = new Dataset(ctx, input, func_, std::move(captured_func), 59 class Dataset : public GraphDatasetBase { 61 Dataset(OpKernelContext* ctx, const DatasetBase* input, 75 ~Dataset() override { input_->Unref(); } 91 string DebugString() override { return "FlatMapDatasetOp::Dataset"; } 125 class Iterator : public DatasetIterator<Dataset> { 128 : DatasetIterator<Dataset>(params), 129 input_impl_(params.dataset->input_->MakeIterator(params.prefix)) {} 157 // Get the next element from the input dataset [all...] |
prefetch_dataset_op.cc | 19 #include "tensorflow/core/kernels/data/dataset.h" 43 *output = new Dataset(ctx, input, buffer_size); 47 class Dataset : public GraphDatasetBase { 49 Dataset(OpKernelContext* ctx, const DatasetBase* input, int64 buffer_size) 54 ~Dataset() override { input_->Unref(); } 69 string DebugString() override { return "PrefetchDatasetOp::Dataset"; } 84 class Iterator : public DatasetIterator<Dataset> { 87 : DatasetIterator<Dataset>(params), 88 input_impl_(params.dataset->input_->MakeIterator(params.prefix)) {} 121 "PrefetchDatasetOp::Dataset::Iterator::GetNext") [all...] |
scan_dataset_op.cc | 22 #include "tensorflow/core/kernels/data/dataset.h" 66 *output = new Dataset(ctx, input, func_, std::move(initial_state), 72 class Dataset : public GraphDatasetBase { 74 Dataset(OpKernelContext* ctx, const DatasetBase* input, 91 ~Dataset() override { input_->Unref(); } 106 string DebugString() override { return "ScanDatasetOp::Dataset"; } 148 class Iterator : public DatasetIterator<Dataset> { 151 : DatasetIterator<Dataset>(params), 152 input_impl_(params.dataset->input_->MakeIterator(params.prefix)), 153 state_(params.dataset->initial_state_) { [all...] |
/external/tensorflow/tensorflow/python/data/kernel_tests/ |
interleave_dataset_op_test.py | 69 # Cycle length 1 acts like `Dataset.flat_map()`. 107 dataset = ( 108 dataset_ops.Dataset.from_tensor_slices(input_values) 110 .interleave(lambda x: dataset_ops.Dataset.from_tensors(x).repeat(x), 112 iterator = dataset.make_initializable_iterator() 117 # Cycle length 1 acts like `Dataset.flat_map()`. 186 return dataset_ops.Dataset.from_tensor_slices( 190 dataset_ops.Dataset.range(10).map(_map_fn).interleave( 206 dataset_ops.Dataset.from_tensor_slices([]) 208 .interleave(dataset_ops.Dataset.from_tensors, cycle_length=2 [all...] |
list_files_dataset_op_test.py | 46 dataset = dataset_ops.Dataset.list_files(path.join(self.tmp_dir, '*')) 48 itr = dataset.make_one_shot_iterator() 56 dataset = dataset_ops.Dataset.list_files(path.join(self.tmp_dir, '*')) 58 itr = dataset.make_one_shot_iterator() 72 dataset = dataset_ops.Dataset.list_files(filename_placeholder) 75 itr = dataset.make_initializable_iterator() 88 dataset = dataset_ops.Dataset.list_files(filename_placeholder [all...] |
iterator_ops_test.py | 55 dataset = dataset_ops.Dataset.from_tensor_slices(component).map(add) 56 value = dataset.make_one_shot_iterator().get_next() 66 dataset = (dataset_ops.Dataset.from_tensor_slices([0.0, 1.0, 2.0]) 69 ValueError, r"`Dataset.make_one_shot_iterator\(\)` does not support " 71 dataset.make_one_shot_iterator() 81 iterator = (dataset_ops.Dataset.from_tensor_slices(components).map(_map_fn) 106 iterator = (dataset_ops.Dataset.from_tensor_slices(tensor_components) 130 iterator = (dataset_ops.Dataset.from_tensor_slices(components [all...] |
map_dataset_op_test.py | 51 return (dataset_ops.Dataset.from_tensor_slices(components).map(_map_fn) 55 """Test an dataset that maps a TF function across its input elements.""" 63 dataset = self._buildMapDataset(components, count) 64 iterator = dataset.make_initializable_iterator() 112 return (dataset_ops.Dataset.from_tensor_slices(components) 118 """Test an dataset that maps a TF function across its input elements.""" 128 dataset = self._buildParallelMapDataset( 130 iterator = dataset.make_initializable_iterator() 187 # Tests whether a parallel map dataset will be cleaned up correctly when 195 dataset = self._buildParallelMapDataset(components, 1000, 100, 100 [all...] |
cache_dataset_op_test.py | 54 repeat_dataset = (dataset_ops.Dataset.from_tensor_slices(components) 80 # Assert that the cached dataset has the same elements as the 122 cache_dataset1 = (dataset_ops.Dataset.from_tensor_slices(components) 124 cache_dataset2 = (dataset_ops.Dataset.from_tensor_slices(components) 152 cache_dataset1 = (dataset_ops.Dataset.from_tensor_slices(components) 154 cache_dataset2 = (dataset_ops.Dataset.from_tensor_slices(components) 208 dataset = dataset_ops.Dataset.range(3).flat_map( 209 lambda x: dataset_ops.Dataset.from_tensors(x).repeat(repeat_count)) 211 cached_dataset = dataset.cache().repeat(2 [all...] |
filter_dataset_op_test.py | 48 dataset_ops.Dataset.from_tensor_slices(components).map(_map_fn) 74 # Test an empty dataset. 78 dataset = dataset_ops.Dataset.range(100).filter( 80 iterator = dataset.make_one_shot_iterator() 89 iterator = (dataset_ops.Dataset.range(10) 116 dataset_ops.Dataset.from_tensor_slices([[1, 2, 3], [4, 5, 6]]) 145 dataset_ops.Dataset.range(10).map(_map_fn).filter(_filter_fn).map(
|
dataset_constructor_op_test.py | 42 """Test a dataset that represents a single tuple of tensors.""" 45 iterator = (dataset_ops.Dataset.from_tensors(components) 67 """Test a dataset that represents a single tuple of tensors.""" 78 dataset_ops.Dataset.from_tensors(components) 96 """Test an dataset that represents a single tuple of tensors.""" 108 dataset_ops.Dataset.from_tensors(components) 130 """Test a dataset that represents the slices from a tuple of tensors.""" 137 iterator = (dataset_ops.Dataset.from_tensor_slices(components) 155 """Test a dataset that represents the slices from a tuple of tensors.""" 166 dataset_ops.Dataset.from_tensor_slices(components [all...] |
/external/tensorflow/tensorflow/contrib/data/python/kernel_tests/ |
bucketing_test.py | 41 dataset_ops.Dataset.from_tensor_slices(components).map(lambda x: x * x) 69 dataset_ops.Dataset.from_tensor_slices(components).repeat(-1).apply( 90 dataset_ops.Dataset.from_tensor_slices(components).apply( 117 dataset_ops.Dataset.from_tensor_slices(components) 135 return dataset_ops.Dataset.zip(( 143 dataset_ops.Dataset.from_tensor_slices(components) 169 return dataset_ops.Dataset.from_tensor_slices(components).repeat(-1).apply( 203 return dataset_ops.Dataset.zip( 204 (dataset_ops.Dataset.from_tensors(bucket), 216 dataset_ops.Dataset.from_tensor_slices(math_ops.range(32)).map(_map_fn) [all...] |
sequence_dataset_op_test.py | 32 return dataset_ops.Dataset.from_tensor_slices(components).skip(count) 52 return dataset_ops.Dataset.from_tensor_slices(components).take(count) 74 return dataset_ops.Dataset.from_tensor_slices(components).take( 100 # Test repeat empty dataset
|
unique_dataset_op_test.py | 44 dataset = dataset_ops.Dataset.from_generator(lambda: current_test_case, 46 iterator = dataset.make_initializable_iterator() 88 return dataset_ops.Dataset.range(num_elements).map(
|
dataset_constructor_op_test.py | 38 dataset = dataset_ops.Dataset.from_tensors(components) 49 new = batching._RestructuredDataset(dataset, new_types, new_shape_lists) 69 new = batching._RestructuredDataset(dataset, new_types, new_shape_lists) 79 return dataset_ops.Dataset.from_tensors(components) 91 return dataset_ops.Dataset.from_tensor_slices(components) 118 return dataset_ops.Dataset.from_sparse_tensor_slices(sparse_components)
|
shuffle_dataset_op_test.py | 41 return dataset_ops.Dataset.range(range_limit).shuffle( 79 return dataset_ops.Dataset.range(num_elements).apply( 142 ds = dataset_ops.Dataset.range(20).apply( 153 return dataset_ops.Dataset.range(20).apply(
|
/external/tensorflow/tensorflow/contrib/training/python/training/ |
tensor_queue_dataset_test.py | 37 dataset = dataset_ops.Dataset.from_tensor_slices([0, 1, 2]) 38 dataset = dataset.apply( 40 self.assertEqual((dtypes.variant, dtypes.int32), dataset.output_types) 42 [x.as_list() for x in dataset.output_shapes]) 43 iterator = dataset.make_one_shot_iterator() 52 dataset = dataset_ops.Dataset.from_tensor_slices([0, 1, 2]) 53 dataset = dataset.apply [all...] |
/external/tensorflow/tensorflow/python/grappler/ |
datasets_test.py | 50 dataset = dataset_ops.Dataset.from_tensors(test_case['tensor']) 51 iterator = dataset.make_one_shot_iterator() 75 dataset = dataset_ops.Dataset.from_tensor_slices(test_case['tensor']) 76 iterator = dataset.make_one_shot_iterator() 108 dataset = dataset_ops.Dataset.from_generator( 112 iterator = dataset.make_one_shot_iterator() 124 dataset = dataset_ops.Dataset.range(42 [all...] |
/developers/samples/android/input/autofill/AutofillFramework/afservice/src/main/java/com/example/android/autofill/service/data/adapter/ |
ResponseAdapter.java | 21 import android.service.autofill.Dataset; 57 Dataset dataset = mDatasetAdapter.buildDatasetForFocusedNode(field, fieldType, remoteViews); local 58 if (dataset != null) { 59 responseBuilder.addDataset(dataset); 76 Dataset dataset; local 84 dataset = mDatasetAdapter.buildDataset(fieldTypesByAutofillHint, 89 dataset = mDatasetAdapter.buildDataset(fieldTypesByAutofillHint, 92 if (dataset != null) [all...] |
/external/tensorflow/tensorflow/python/data/ops/ |
dataset_ops.py | 47 @tf_export("data.Dataset") 48 class Dataset(object): 51 A `Dataset` can be used to represent an input pipeline as a 62 """Creates a scalar `tf.Tensor` of `tf.variant` representing this dataset. 65 A scalar `tf.Tensor` of `tf.variant` type, which represents this dataset. 67 raise NotImplementedError("Dataset._as_variant_tensor") 70 """Creates an `Iterator` for enumerating the elements of this dataset. 76 dataset = ... 77 iterator = dataset.make_initializable_iterator() 88 An `Iterator` over the elements of this dataset [all...] |
/developers/build/prebuilts/gradle/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/ |
FilledAutofillFieldCollection.kt | 18 import android.service.autofill.Dataset 31 * dataset name associated with it. 49 * Populates a [Dataset.Builder] with appropriate values for each [AutofillId] 50 * in a `AutofillFieldMetadataCollection`. In other words, it builds an Autofill dataset 56 datasetBuilder: Dataset.Builder): Boolean {
|
/developers/samples/android/input/autofill/AutofillFramework/kotlinApp/Application/src/main/java/com/example/android/autofillframework/multidatasetservice/model/ |
FilledAutofillFieldCollection.kt | 18 import android.service.autofill.Dataset 31 * dataset name associated with it. 49 * Populates a [Dataset.Builder] with appropriate values for each [AutofillId] 50 * in a `AutofillFieldMetadataCollection`. In other words, it builds an Autofill dataset 56 datasetBuilder: Dataset.Builder): Boolean {
|
/external/tensorflow/tensorflow/contrib/data/python/ops/ |
error_ops.py | 15 """Ignore_errors dataset transformations.""" 28 """Creates a `Dataset` from another `Dataset` and silently ignores any errors. 30 Use this transformation to produce a dataset that contains the same elements 35 dataset = tf.data.Dataset.from_tensor_slices([1., 2., 0., 4.]) 38 dataset = dataset.map(lambda x: tf.check_numerics(1. / x, "error")) 41 dataset = 42 dataset.apply(tf.contrib.data.ignore_errors()) # ==> { 1., 0.5, 0.2 [all...] |
grouping.py | 15 """Grouping dataset transformations.""" 35 This transformation maps each consecutive element in a dataset to a key 48 reduce_func: A function mapping a key and a dataset of up to `window_size` 49 consecutive elements matching that key to another dataset. 60 A `Dataset` transformation function, which can be passed to 61 @{tf.data.Dataset.apply}. 80 def _apply_fn(dataset): 81 """Function from `Dataset` to `Dataset` that applies the transformation.""" 82 return GroupByWindowDataset(dataset, key_func, reduce_func [all...] |