From fd623c32de511cdde8ef27fc8e071631b8d4a158 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 13 Aug 2018 12:38:22 +0200 Subject: [PATCH] Add tensorboard export script --- pywatts/board.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pywatts/board.py diff --git a/pywatts/board.py b/pywatts/board.py new file mode 100644 index 0000000..bd951dc --- /dev/null +++ b/pywatts/board.py @@ -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']) \ No newline at end of file