Skip to content

Commit

Permalink
Updated to TensorFlow v1.0
Browse files Browse the repository at this point in the history
Remove depreciated modules such as scalar_summary
  • Loading branch information
alanyee committed Jun 29, 2017
1 parent d7a44d0 commit 54f94c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ch02_basics/moving_avg.py
Expand Up @@ -12,11 +12,11 @@
prev_avg = tf.Variable(0.)
update_avg = alpha * curr_value + (1 - alpha) * prev_avg

avg_hist = tf.scalar_summary("running average", update_avg)
value_hist = tf.scalar_summary("incoming values", curr_value)
merged = tf.merge_all_summaries()
writer = tf.train.SummaryWriter("./logs")
init = tf.initialize_all_variables()
avg_hist = tf.summary.scalar("running_avg", update_avg)
value_hist = tf.summary.scalar("incoming_values", curr_value)
merged = tf.summary.merge_all()
writer = tf.summary.FileWriter('./logs')
init = tf.global_variables_initializer()

with tf.Session() as sess:
sess.run(init)
Expand Down

1 comment on commit 54f94c6

@zohrevand87
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello

Please sign in to comment.