diff options
Diffstat (limited to 'tensorflow/docs_src/get_started/get_started.md')
-rw-r--r-- | tensorflow/docs_src/get_started/get_started.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tensorflow/docs_src/get_started/get_started.md b/tensorflow/docs_src/get_started/get_started.md index b71249de0a..04ac3f5848 100644 --- a/tensorflow/docs_src/get_started/get_started.md +++ b/tensorflow/docs_src/get_started/get_started.md @@ -71,7 +71,7 @@ is a constant. Like all TensorFlow constants, it takes no inputs, and it outputs a value it stores internally. We can create two floating point Tensors `node1` and `node2` as follows: ```python -node1 = tf.constant(3.0, tf.float32) +node1 = tf.constant(3.0, dtype=tf.float32) node2 = tf.constant(4.0) # also tf.float32 implicitly print(node1, node2) ``` @@ -110,7 +110,7 @@ print("sess.run(node3): ",sess.run(node3)) ``` The last two print statements produce ``` -node3: Tensor("Add_2:0", shape=(), dtype=float32) +node3: Tensor("Add:0", shape=(), dtype=float32) sess.run(node3): 7.0 ``` @@ -173,8 +173,8 @@ initial value: ```python -W = tf.Variable([.3], tf.float32) -b = tf.Variable([-.3], tf.float32) +W = tf.Variable([.3], dtype=tf.float32) +b = tf.Variable([-.3], dtype=tf.float32) x = tf.placeholder(tf.float32) linear_model = W * x + b ``` @@ -294,8 +294,8 @@ import numpy as np import tensorflow as tf # Model parameters -W = tf.Variable([.3], tf.float32) -b = tf.Variable([-.3], tf.float32) +W = tf.Variable([.3], dtype=tf.float32) +b = tf.Variable([-.3], dtype=tf.float32) # Model input and output x = tf.placeholder(tf.float32) linear_model = W * x + b |