diff options
author | Jiri Simsa <jsimsa@google.com> | 2018-09-27 16:05:51 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-27 16:09:18 -0700 |
commit | ece50dd9992ac17e3094c7f6d1914febd7a036b5 (patch) | |
tree | 18de739f4a7e33abbc9631b46b3992ac53ff446b /tensorflow/core/ops | |
parent | b8c86c3bbd8271ed968087f24e7fb704103bc733 (diff) |
[tf.data Introducing tf.data.Dataset.reduce() which reduces elements of a (finite) dataset to a single element.
PiperOrigin-RevId: 214852364
Diffstat (limited to 'tensorflow/core/ops')
-rw-r--r-- | tensorflow/core/ops/dataset_ops.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tensorflow/core/ops/dataset_ops.cc b/tensorflow/core/ops/dataset_ops.cc index 1ada623cf5..71f4cc3c4c 100644 --- a/tensorflow/core/ops/dataset_ops.cc +++ b/tensorflow/core/ops/dataset_ops.cc @@ -756,6 +756,19 @@ REGISTER_OP("DatasetToSingleElement") .Attr("output_shapes: list(shape) >= 1") .SetShapeFn(IteratorGetNextShapeFn); +REGISTER_OP("ReduceDataset") + .Input("input_dataset: variant") + .Input("initial_state: Tstate") + .Input("other_arguments: Targuments") + .Output("components: output_types") + .Attr("f: func") + .Attr("Tstate: list(type) >= 1") + .Attr("Targuments: list(type) >= 0") + .Attr("output_types: list(type) >= 1") + .Attr("output_shapes: list(shape) >= 1") + .Attr("use_inter_op_parallelism: bool = true") + .SetShapeFn(IteratorGetNextShapeFn); + REGISTER_OP("IteratorToStringHandle") .Input("resource_handle: resource") .Output("string_handle: string") |