I have tried something like this:
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
merged = tf.summary.merge_all()
writer = tf.summary.FileWriter('logs', sess.graph)
for iteration in range(int(n_epochs*train_set_size/batch_size)):
x_batch, y_batch = get_next_batch(batch_size) # fetch the next training batch
sess.run(training_op, feed_dict={X: x_batch, y: y_batch})
if iteration % int(1*train_set_size/batch_size) == 0:
mse_train = loss.eval(feed_dict={X: x_train, y: y_train})
mse_valid = loss.eval(feed_dict={X: x_valid, y: y_valid})
mse_test = loss.eval(feed_dict={X: x_test, y: y_test})
y_train_pred,summary1,outimage = sess.run([outputs,merged,out_img_sum], feed_dict={X: x_train,y:y_train})
y_valid_pred,summary2 = sess.run([outputs,merged], feed_dict={X: x_valid,y:y_valid})
y_test_pred,summary3 = sess.run([outputs,merged], feed_dict={X: x_test,y:y_test})
writer.add_summary(summary1, iteration*batch_size/train_set_size)
I am willing to show the y_train
and y_train_pred
values on the tensorboard. How I can do that? These are like the arrays and I am not getting a way out to show these values comparison on Tensorboard. Please help me.