diff options
author | 2017-07-27 10:37:50 -0700 | |
---|---|---|
committer | 2017-07-27 10:41:32 -0700 | |
commit | 2139e7d8b10764f2245f34548f6fbfc25d29bff8 (patch) | |
tree | e4cac70c716c94b911ff1acbe42335489eb50642 /tensorflow | |
parent | ddd8e21b7c1d23bf80ddf0141b44e168c17647f3 (diff) |
[tf.contrib.data] map expects a nested structure.
Fixes #11786
PiperOrigin-RevId: 163359134
Diffstat (limited to 'tensorflow')
-rw-r--r-- | tensorflow/docs_src/programmers_guide/datasets.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/docs_src/programmers_guide/datasets.md b/tensorflow/docs_src/programmers_guide/datasets.md index 84eed87169..006245b44b 100644 --- a/tensorflow/docs_src/programmers_guide/datasets.md +++ b/tensorflow/docs_src/programmers_guide/datasets.md @@ -548,8 +548,8 @@ labels = [0, 37, 29, 1, ...] dataset = tf.contrib.data.Dataset.from_tensor_slices((filenames, labels)) dataset = dataset.map( - lambda filename, label: tf.py_func( - _read_py_function, [filename, label], [tf.uint8, label.dtype])) + lambda filename, label: tuple(tf.py_func( + _read_py_function, [filename, label], [tf.uint8, label.dtype]))) dataset = dataset.map(_resize_function) ``` |