Reinforcement-learning-with-tensorflow
Reinforcement-learning-with-tensorflow copied to clipboard
如何画奖励与训练回合的关系图?
You need to use Tensorboard which comes with Tensorflow installed.
tf.reset_default_graph()
sess = tf.Session()
# Your Tensorflow graph goes here.
# ...
sess.run(tf.global_variables_initializer())
# Declare tf.summary.FileWriter where log is your output directory for Tensorboard & add the graph to the writer.
writer = tf.summary.FileWriter('log', sess.graph)
# Run your training loop
# sess.run(...)
writer.close()
Run this command in terminal to open tensorboard:
tensorboard --logdir log
Navigate to http://127.0.0.1:6006 in your browser to access Tensorflow.
Your graph is in the graph tab.