aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/how_tos
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-01-11 11:36:34 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-11 11:36:34 -0800
commit492e55ff2297dc13f5ed540056ad40603f2b1dd0 (patch)
treec142c09cefdeaa9d2805f6f9bffa16d1872bacb1 /tensorflow/examples/how_tos
parent22267addd64b00f9457605cdce3d82276a478780 (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.py6
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