diff options
author | A. Unique TensorFlower <nobody@tensorflow.org> | 2016-01-11 11:36:34 -0800 |
---|---|---|
committer | Vijay Vasudevan <vrv@google.com> | 2016-01-11 11:36:34 -0800 |
commit | 492e55ff2297dc13f5ed540056ad40603f2b1dd0 (patch) | |
tree | c142c09cefdeaa9d2805f6f9bffa16d1872bacb1 /tensorflow/examples/how_tos | |
parent | 22267addd64b00f9457605cdce3d82276a478780 (diff) |
Add new parse_example functions that take namedtuple config objects, and prepend old API functions with "legacy_".
Change: 111745511
Diffstat (limited to 'tensorflow/examples/how_tos')
-rw-r--r-- | tensorflow/examples/how_tos/reading_data/fully_connected_reader.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/examples/how_tos/reading_data/fully_connected_reader.py b/tensorflow/examples/how_tos/reading_data/fully_connected_reader.py index bf1ef08c60..774e972241 100644 --- a/tensorflow/examples/how_tos/reading_data/fully_connected_reader.py +++ b/tensorflow/examples/how_tos/reading_data/fully_connected_reader.py @@ -58,9 +58,11 @@ def read_and_decode(filename_queue): _, serialized_example = reader.read(filename_queue) features = tf.parse_single_example( serialized_example, - dense_keys=['image_raw', 'label'], # Defaults are not specified since both keys are required. - dense_types=[tf.string, tf.int64]) + features={ + 'image_raw': tf.FixedLenFeature([], tf.string), + 'label': tf.FixedLenFeature([], tf.int64), + }) # Convert from a scalar string tensor (whose single string has # length mnist.IMAGE_PIXELS) to a uint8 tensor with shape |