diff options
author | 2018-08-22 15:00:02 -0700 | |
---|---|---|
committer | 2018-08-22 15:09:36 -0700 | |
commit | fb3bde1994d4ed7d6cb928326e8e2a1777930e5e (patch) | |
tree | 2232beae78bbeaf016f2f165e9f34e4e5a23bf3e /tensorflow/core/ops/dataset_ops.cc | |
parent | b56e4377687b95014fa8dadc8e99192484fa79a0 (diff) |
[tf.data] Implements `dataset` transformation `parse_example_dataset(..)` which will replace dataset.map(parsing_ops.parse_example(..)).
PiperOrigin-RevId: 209836033
Diffstat (limited to 'tensorflow/core/ops/dataset_ops.cc')
-rw-r--r-- | tensorflow/core/ops/dataset_ops.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tensorflow/core/ops/dataset_ops.cc b/tensorflow/core/ops/dataset_ops.cc index 13733d48f0..07e735c7cb 100644 --- a/tensorflow/core/ops/dataset_ops.cc +++ b/tensorflow/core/ops/dataset_ops.cc @@ -166,6 +166,23 @@ REGISTER_OP("LatencyStatsDataset") return shape_inference::ScalarShape(c); }); +REGISTER_OP("ParseExampleDataset") + .Input("input_dataset: variant") + .Input("num_parallel_calls: int64") + .Input("dense_defaults: Tdense") + + .Output("handle: variant") + .Attr("sparse_keys: list(string) >= 0") + .Attr("dense_keys: list(string) >= 0") + .Attr("sparse_types: list({float,int64,string}) >= 0") + .Attr("Tdense: list({float,int64,string}) >= 0") + .Attr("dense_shapes: list(shape) >= 0") + .Attr("output_types: list(type) >= 1") + .Attr("output_shapes: list(shape) >= 1") // Output components will be + // sorted by key (dense_keys and + // sparse_keys combined) here. + .SetShapeFn(shape_inference::ScalarShape); + REGISTER_OP("FeatureStatsDataset") .Input("input_dataset: variant") .Input("tag: string") |