Tensorboard quick start in 5 minutes.

Go

1. Add code to your Tensorflow program to collect data (3 min)

1.1 What do you want to track? (1+ lines)

# .... your code ...def your_sub_function():  softmax_w = tf.Variable(tf.truncated_normal( (in_size, ...)  tf.summary.histogram(“softmax_w”, softmax_w)  # Another variable you want to store  predictions = tf.nn.softmax(logits, name="predictions")  tf.summary.histogram("predictions", predictions)

# .... your code ...
tf.summary.histogram(“your_variable_name”, your_variable)

1.2 Save stuff during training (4 lines)

with tf.Session() as sess:  train_writer = tf.summary.FileWriter( './logs/1/train ', sess.graph)  counter = 0
for e in range(epochs)
for x, y in get_batches(....):
counter += 1

merge = tf.summary.merge_all()
summary, batch_loss, new_state, _ = sess.run([merge, model.loss, model.final_state, model.optimizer],feed_dict=feed) train_writer.add_summary(summary, counter) # .... your code ...

2. Start training operations (< 1 min)

3. Start Tensorboard server (< 1 min)

tensorboard --logdir logs/1
http://localhost:6006/
Example with logs stored in logs/2

Tensorboard! :)

with tf.name_scope(“RNN_init_state”):
initial_state = rnn_cells.zero_state(batch_size, tf.float32)

Further resources

--

--

https://diffgram.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store