Add tensorboard export script

This commit is contained in:
Paul Schaub 2018-08-13 12:38:22 +02:00
parent 0c07241104
commit fd623c32de
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

11
pywatts/board.py Normal file
View file

@ -0,0 +1,11 @@
import tensorflow as tf
import subprocess
writer = tf.summary.FileWriter("tensorboard")
checkpoint = tf.train.get_checkpoint_state('tf_pywatts_model')
with tf.Session() as sess:
saver = tf.train.import_meta_graph(checkpoint.model_checkpoint_path + '.meta')
saver.restore(sess, checkpoint.model_checkpoint_path)
writer.add_graph(sess.graph)
subprocess.check_output(['tensorboard', '--logdir', 'tensorboard'])