aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/examples/learn
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com>2018-05-14 11:12:32 -0700
committerGravatar Rasmus Munk Larsen <rmlarsen@google.com>2018-05-14 11:12:32 -0700
commit7a2ef3d93358fbf0b006d00acb25cbf451ff1bee (patch)
treea35298ec9e7a73a4b9a1628382b40f2faf0aeb4a /tensorflow/examples/learn
parent0bb7a191a33222c44ff50a3c74b550ee72f8b0e4 (diff)
Fix warning caused by squeeze_dims (#19227)
The `squeeze_dims` in `tf.squeeze` has been deprecated in favor of `axis`. This fix fixes the `squeeze_dims` in text_classification_cnn.py so that the warning could be removed. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Diffstat (limited to 'tensorflow/examples/learn')
-rw-r--r--tensorflow/examples/learn/text_classification_cnn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/examples/learn/text_classification_cnn.py b/tensorflow/examples/learn/text_classification_cnn.py
index 9e21aee87f..a40a9eaecb 100644
--- a/tensorflow/examples/learn/text_classification_cnn.py
+++ b/tensorflow/examples/learn/text_classification_cnn.py
@@ -73,7 +73,7 @@ def cnn_model(features, labels, mode):
kernel_size=FILTER_SHAPE2,
padding='VALID')
# Max across each filter to get useful features for classification.
- pool2 = tf.squeeze(tf.reduce_max(conv2, 1), squeeze_dims=[1])
+ pool2 = tf.squeeze(tf.reduce_max(conv2, 1), axis=[1])
# Apply regular WX + B and classification.
logits = tf.layers.dense(pool2, MAX_LABEL, activation=None)