From 7e7d55c0f5bae2380a76d39fbc51131f843c0320 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 5 Oct 2017 09:50:17 -0700 Subject: [PATCH] [tf.data] Iterator and data/nest documentation fixes PiperOrigin-RevId: 171165796 --- tensorflow/python/data/ops/iterator_ops.py | 8 ++++---- tensorflow/python/data/util/nest.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tensorflow/python/data/ops/iterator_ops.py b/tensorflow/python/data/ops/iterator_ops.py index d11112d0046..d4f05a055a2 100644 --- a/tensorflow/python/data/ops/iterator_ops.py +++ b/tensorflow/python/data/ops/iterator_ops.py @@ -138,21 +138,21 @@ class Iterator(object): This method allows you to define a "feedable" iterator where you can choose between concrete iterators by feeding a value in a @{tf.Session.run} call. In that case, `string_handle` would a @{tf.placeholder}, and you would feed - it with the value of @{tf.contrib.data.Iterator.string_handle} in each step. + it with the value of @{tf.data.Iterator.string_handle} in each step. For example, if you had two iterators that marked the current position in a training dataset and a test dataset, you could choose which to use in each step as follows: ```python - train_iterator = tf.contrib.data.Dataset(...).make_one_shot_iterator() + train_iterator = tf.data.Dataset(...).make_one_shot_iterator() train_iterator_handle = sess.run(train_iterator.string_handle()) - test_iterator = tf.contrib.data.Dataset(...).make_one_shot_iterator() + test_iterator = tf.data.Dataset(...).make_one_shot_iterator() test_iterator_handle = sess.run(test_iterator.string_handle()) handle = tf.placeholder(tf.string, shape=[]) - iterator = tf.contrib.data.Iterator.from_string_handle( + iterator = tf.data.Iterator.from_string_handle( handle, train_iterator.output_types) next_element = iterator.get_next() diff --git a/tensorflow/python/data/util/nest.py b/tensorflow/python/data/util/nest.py index 83908d8a0e9..421513cafc6 100644 --- a/tensorflow/python/data/util/nest.py +++ b/tensorflow/python/data/util/nest.py @@ -106,7 +106,7 @@ def is_sequence(seq): NOTE(mrry): This differs from `tensorflow.python.util.nest.is_sequence()`, which *does* treat a Python list as a sequence. For ergonomic - reasons, `tf.contrib.data` users would prefer to treat lists as + reasons, `tf.data` users would prefer to treat lists as implict `tf.Tensor` objects, and dicts as (nested) sequences. Args: