Hi - I would like to save graph for visualisation in tensorboard. Tried to use tf.summary.FileWriter, but it does not generate any file. Please could you check - was it my mistake, or tf.summary is not supported? This is in the code sample below, 3)
Also a general question which method to use to save the graph. I have found 4 methods - see the code sample below. Seems that in this project you prefer 4) (meta). What are the difference, which one would you recommend?
var a = tf.Variable(10, name : "a");
var b = tf.Variable(5, name : "b");
var mult = tf.multiply(a, b);
var init = tf.global_variables_initializer();
var saver = tf.train.Saver();
var mult_summary = tf.summary.scalar("mult", mult);
with(tf.Session(), sess =>
{
sess.run(init);
var result = sess.run(new object[] { mult } );
Console.WriteLine(result[0].ToString());
// 1)
saver.save(sess, "./Saver");
// 2)
tf.train.write_graph(sess.graph, ".", "write_graph.pb", as_text:false);
// 3)
var file_writer = tf.summary.FileWriter(".", sess.graph);
file_writer.add_summary(result[0].ToString());
// 4)
tf.train.export_meta_graph(".\export_meta_graph.meta", as_text:false);
});
The text was updated successfully, but these errors were encountered:
Hi - I would like to save graph for visualisation in tensorboard. Tried to use tf.summary.FileWriter, but it does not generate any file. Please could you check - was it my mistake, or tf.summary is not supported? This is in the code sample below, 3)
Also a general question which method to use to save the graph. I have found 4 methods - see the code sample below. Seems that in this project you prefer 4) (meta). What are the difference, which one would you recommend?
The text was updated successfully, but these errors were encountered: