aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/get_started/basic_usage.md
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-11-09 10:11:07 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-11-09 10:11:07 -0800
commit61d3a958d6d83cb6037490d933b47621cc4009cc (patch)
tree20630337ec30cbc6d974730d3bfdd22508f6e257 /tensorflow/g3doc/get_started/basic_usage.md
parent9f64983a8458700ba1aec613a755e8264b1608e0 (diff)
TensorFlow: Initial steps towards python3 support, some documentation
bug fixes -- reindents to 2 for some of the files to match our internal requirements. Thanks to Martin Andrews for the basic_usage.md suggested fix via Gerrit. Base CL: 107394029
Diffstat (limited to 'tensorflow/g3doc/get_started/basic_usage.md')
-rw-r--r--tensorflow/g3doc/get_started/basic_usage.md20
1 files changed, 10 insertions, 10 deletions
diff --git a/tensorflow/g3doc/get_started/basic_usage.md b/tensorflow/g3doc/get_started/basic_usage.md
index c29f6a4179..df4f769983 100644
--- a/tensorflow/g3doc/get_started/basic_usage.md
+++ b/tensorflow/g3doc/get_started/basic_usage.md
@@ -194,9 +194,9 @@ shows a variable serving as a simple counter. See
```python
# Create a Variable, that will be initialized to the scalar value 0.
-var = tf.Variable(0, name="counter")
+state = tf.Variable(0, name="counter")
-# Create an Op to add one to `var`.
+# Create an Op to add one to `state`.
one = tf.constant(1)
new_value = tf.add(state, one)
@@ -209,14 +209,14 @@ init_op = tf.initialize_all_variables()
# Launch the graph and run the ops.
with tf.Session() as sess:
- # Run the 'init' op
- sess.run(init_op)
- # Print the initial value of 'var'
- print sess.run(var)
- # Run the op that updates 'var' and print 'var'.
- for _ in range(3):
- sess.run(update)
- print sess.run(var)
+ # Run the 'init' op
+ sess.run(init_op)
+ # Print the initial value of 'state'
+ print sess.run(state)
+ # Run the op that updates 'state' and print 'state'.
+ for _ in range(3):
+ sess.run(update)
+ print sess.run(state)
# output: