From 61d3a958d6d83cb6037490d933b47621cc4009cc Mon Sep 17 00:00:00 2001 From: Vijay Vasudevan Date: Mon, 9 Nov 2015 10:11:07 -0800 Subject: 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 --- tensorflow/g3doc/get_started/basic_usage.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tensorflow/g3doc/get_started/basic_usage.md') 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: -- cgit v1.2.3