Created
August 3, 2019 14:31
-
-
Save Janus-Shiau/9bda7ac90dfa0460181feda85891d380 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
var = tf.Variable(0, dtype=tf.int32) | |
counter = tf.add(var,1) | |
counter = tf.assign(var, counter) | |
with tf.Session() as sess: | |
tf.global_variables_initializer().run() | |
for i in range(5): | |
print(counter.eval()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment