aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/get_started/basic_usage.md
diff options
context:
space:
mode:
authorGravatar Andrew Selle <aselle@google.com>2017-01-04 10:03:37 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-04 10:25:41 -0800
commit4982c62ae45a5e1549f2c202fb4834065ab9a1ac (patch)
tree8e08a41270f34acca7feeab71d37a18babf60f59 /tensorflow/g3doc/get_started/basic_usage.md
parentbd970230fb9a7547ca53d115f88a4ae652f888c6 (diff)
Add deprecation warnings to tf.neg and prepare for deprecation warnings of
tf.mul, tf.sub per go/tf-numpy-parity-plan - Created wrappers for mul, multiply, sub and subtract. Made wrapper for negative - Propagate docstrings from ops in wrappers - Add Mul and Neg to hidden_ops.txt - Change gen_math_ops.sub to gen_math_ops._sub - Change gen_math_ops.mul to gen_math_ops._mul Change: 143565494
Diffstat (limited to 'tensorflow/g3doc/get_started/basic_usage.md')
-rw-r--r--tensorflow/g3doc/get_started/basic_usage.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/g3doc/get_started/basic_usage.md b/tensorflow/g3doc/get_started/basic_usage.md
index d1c008940a..c39f365ed8 100644
--- a/tensorflow/g3doc/get_started/basic_usage.md
+++ b/tensorflow/g3doc/get_started/basic_usage.md
@@ -201,7 +201,7 @@ a = tf.constant([3.0, 3.0])
x.initializer.run()
# Add an op to subtract 'a' from 'x'. Run it and print the result
-sub = tf.sub(x, a)
+sub = tf.subtract(x, a)
print(sub.eval())
# ==> [-2. -1.]
@@ -278,7 +278,7 @@ input1 = tf.constant([3.0])
input2 = tf.constant([2.0])
input3 = tf.constant([5.0])
intermed = tf.add(input2, input3)
-mul = tf.mul(input1, intermed)
+mul = tf.multiply(input1, intermed)
with tf.Session() as sess:
result = sess.run([mul, intermed])
@@ -307,7 +307,7 @@ tf.placeholder() to create them:
input1 = tf.placeholder(tf.float32)
input2 = tf.placeholder(tf.float32)
-output = tf.mul(input1, input2)
+output = input1 * input2
with tf.Session() as sess:
print(sess.run([output], feed_dict={input1:[7.], input2:[2.]}))