diff options
author | Derek Murray <mrry@google.com> | 2017-12-20 20:54:25 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-20 20:57:54 -0800 |
commit | 96f3023b6a8b154c3840776c5feff3e028860a36 (patch) | |
tree | 023052b527aaf486dc52aba70bbf4de84685527f /tensorflow/core/util/example_proto_fast_parsing.h | |
parent | 469e10274cb4e0c79cd314d3986917f322d4e0c1 (diff) |
[tf.data] Add `tf.contrib.data.parse_single_example()`.
The new op is a fused implementation of the existing
`tf.parse_single_example()`, which is more efficient when parsing a
single Example at a time.
PiperOrigin-RevId: 179768512
Diffstat (limited to 'tensorflow/core/util/example_proto_fast_parsing.h')
-rw-r--r-- | tensorflow/core/util/example_proto_fast_parsing.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/core/util/example_proto_fast_parsing.h b/tensorflow/core/util/example_proto_fast_parsing.h index 20536cee16..fe59ec77ca 100644 --- a/tensorflow/core/util/example_proto_fast_parsing.h +++ b/tensorflow/core/util/example_proto_fast_parsing.h @@ -79,6 +79,12 @@ Status FastParseExample(const FastParseExampleConfig& config, gtl::ArraySlice<string> example_names, thread::ThreadPool* thread_pool, Result* result); +// TODO(mrry): Move the hash table construction into the config object. +typedef FastParseExampleConfig FastParseSingleExampleConfig; + +Status FastParseSingleExample(const FastParseSingleExampleConfig& config, + const string& serialized, Result* result); + // This function parses serialized Example and populates given example. // It uses the same specialized parser as FastParseExample which is efficient. // But then constructs Example which is relatively slow. |