Skip to content

Commit 66bd5ae

Browse files
committed
compatibility issue
1 parent 06255ae commit 66bd5ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tutorial-contents/303_save_reload.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def save():
3838
for step in range(100): # train
3939
sess.run(train_op, {tf_x: x, tf_y: y})
4040

41-
saver.save(sess, 'params', write_meta_graph=False) # meta_graph is not recommended
41+
saver.save(sess, './params', write_meta_graph=False) # meta_graph is not recommended
4242

4343
# plotting
4444
pred, l = sess.run([o, loss], {tf_x: x, tf_y: y})
@@ -61,7 +61,7 @@ def reload():
6161
sess = tf.Session()
6262
# don't need to initialize variables, just restoring trained variables
6363
saver = tf.train.Saver() # define a saver for saving and restoring
64-
saver.restore(sess, 'params')
64+
saver.restore(sess, './params')
6565

6666
# plotting
6767
pred, l = sess.run([o_, loss_], {tf_x: x, tf_y: y})

0 commit comments

Comments
 (0)