question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to put scalars in the same row in tensorboard in TF2.0?

See original GitHub issue

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template

System information

  • TensorFlow version (you are using): 2.0
  • Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.

I did not see related arguments in the documentation. If there is such function, please let me know. 😛

The following code produces a tensorboard with 3 different rows. How to put the first two in one row and the second in the other?

with summary_writer.as_default():
    tf.summary.scalar("training_loss", loss, step=batch_index)
    tf.summary.scalar("learning_rate", optimizer.learning_rate, step=batch_index)
with summary_writer.as_default():
    tf.summary.scalar("validation_loss", val_loss, step=batch_index)

Will this change the current api? How? Probably Who will benefit with this feature?

Any Other info.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
nfeltcommented, Dec 3, 2019

@zhangjh915 the categories are based on common prefixes in the tag names, delimited by slashes like a filename. So e.g. if you emit the summaries with the names tf.summary.scalar("training/training_loss", ...) and tf.summary.scalar("training/validation_loss", ...) it should do what you want.

You can also make this happen automatically by putting them inside a tf.name_scope() block like this:

with tf.name_scope("training"):
  tf.summary.scalar("training_loss", ...)
  tf.summary.scalar("validation_loss", ...)
1reaction
david-ngo-sixensecommented, May 6, 2021

Yes, it’s working @psybuzz . Thanks very much.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to put scalars in the same row in tensorboard in TF2.0?
The link is https://github.com/tensorflow/tensorboard/issues/2984. Basically, just add the catagory name before the scalar name as:
Read more >
TensorBoard Scalars: Logging training metrics in Keras
First, generate 1000 data points roughly along the line y = 0.5x + 2. Split these data points into training and test sets....
Read more >
Basics of Using TensorBoard in TensorFlow 1 & 2 - Medium
TensorBoard can visualize anything from scalars (e.g., loss/accuracy), to images, histograms, to the TensorFlow graph, to much more.
Read more >
Deep Dive Into TensorBoard: Tutorial With Examples
How to run TensorBoard. Running Tensorboard involves just one line of code. In this section you'll see how to do this. Let's now...
Read more >
3- Introduction to Tensorboard - Easy TensorFlow
o. n. TensorBoard is a visualization software that comes with any standard TensorFlow ... Let's modify the code one more time and add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found