aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-11-08 11:28:26 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-08 16:25:41 -0800
commit452f53fad4697f68f27774bfb8bdce8a59747239 (patch)
tree46d3345ee72020db91fefca089ef3d5bef067d84 /tensorflow/examples
parent9c48e09ba59215e6b06d34c89bd9be9287f11c3f (diff)
Switch callers of tf.pack and tf.unpack to call tf.stack and tf.unstack
instead. Change: 138542316
Diffstat (limited to 'tensorflow/examples')
-rw-r--r--tensorflow/examples/learn/text_classification.py2
-rw-r--r--tensorflow/examples/learn/text_classification_builtin_rnn_model.py2
-rw-r--r--tensorflow/examples/learn/text_classification_character_rnn.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/examples/learn/text_classification.py b/tensorflow/examples/learn/text_classification.py
index 7ad77787ab..a26cdefda8 100644
--- a/tensorflow/examples/learn/text_classification.py
+++ b/tensorflow/examples/learn/text_classification.py
@@ -60,7 +60,7 @@ def rnn_model(features, target):
# Split into list of embedding per word, while removing doc length dim.
# word_list results to be a list of tensors [batch_size, EMBEDDING_SIZE].
- word_list = tf.unpack(word_vectors, axis=1)
+ word_list = tf.unstack(word_vectors, axis=1)
# Create a Gated Recurrent Unit cell with hidden size of EMBEDDING_SIZE.
cell = tf.nn.rnn_cell.GRUCell(EMBEDDING_SIZE)
diff --git a/tensorflow/examples/learn/text_classification_builtin_rnn_model.py b/tensorflow/examples/learn/text_classification_builtin_rnn_model.py
index 79654eb902..aaa6b53e3f 100644
--- a/tensorflow/examples/learn/text_classification_builtin_rnn_model.py
+++ b/tensorflow/examples/learn/text_classification_builtin_rnn_model.py
@@ -42,7 +42,7 @@ def input_op_fn(features):
features, vocab_size=n_words, embed_dim=EMBEDDING_SIZE, scope='words')
# Split into list of embedding per word, while removing doc length dim.
# word_list results to be a list of tensors [batch_size, EMBEDDING_SIZE].
- word_list = tf.unpack(word_vectors, axis=1)
+ word_list = tf.unstack(word_vectors, axis=1)
return word_list
diff --git a/tensorflow/examples/learn/text_classification_character_rnn.py b/tensorflow/examples/learn/text_classification_character_rnn.py
index bca3df4c04..485d7592c4 100644
--- a/tensorflow/examples/learn/text_classification_character_rnn.py
+++ b/tensorflow/examples/learn/text_classification_character_rnn.py
@@ -48,7 +48,7 @@ def char_rnn_model(features, target):
"""Character level recurrent neural network model to predict classes."""
target = tf.one_hot(target, 15, 1, 0)
byte_list = tf.ont_hot(features, 256, 1, 0)
- byte_list = tf.unpack(byte_list, axis=1)
+ byte_list = tf.unstack(byte_list, axis=1)
cell = tf.nn.rnn_cell.GRUCell(HIDDEN_SIZE)
_, encoding = tf.nn.rnn(cell, byte_list, dtype=tf.float32)