Skip to content

Commit 1b525f3

Browse files
committed
Oops, forgot the saver!
1 parent ec21dc5 commit 1b525f3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎ch13_3rd/tf_breakout.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,11 @@ def __init__(self, num_actions, restore_network=False):
9292
# Define loss and gradient update operation
9393
self.a, self.y, self.loss, self.grads_update = self.build_training_op(q_network_weights)
9494

95+
# Interactive session instead of the usual one just vecause it is simple to create
96+
# Would need some refactoring otherwise of this constructor
9597
self.sess = tf.InteractiveSession()
9698
self.sess.run(tf.global_variables_initializer())
99+
self.saver = tf.train.Saver(q_network_weights)
97100
self.summary_placeholders, self.update_ops, self.summary_op = self.setup_summary()
98101
self.summary_writer = tf.summary.FileWriter(tensorboard_path, self.sess.graph)
99102

0 commit comments

Comments
 (0)