36

TensorBoard 1.1.0's images history. I would like to set the slider's position (on top of the black image with 7) more precisely, to be able to select any step. Now I can only select e.g. between steps 2050 or 2810. Is that possible?

Maybe a place in sources where the 10 constant is hardcoded?

  • enter image description here
1
  • Sorry, how could I change the tensorboard backend code? I am in Ubuntu but cannot find the source code path... Thank you!
    – ch271828n
    Commented Jan 28, 2018 at 23:57

3 Answers 3

71

I answered this question over there "TensorBoard doesn't show all data points", but this seems to be more popular so I will quote it here.

You don't have to change the source code for this, there is a flag called --samples_per_plugin.

Quoting from the help command

--samples_per_plugin: An optional comma separated list of plugin_name=num_samples pairs to explicitly specify how many samples to keep per tag for that plugin. For unspecified plugins, TensorBoard randomly downsamples logged summaries to reasonable values to prevent out-of-memory errors for long running jobs. This flag allows fine control over that downsampling. Note that 0 means keep all samples of that type. For instance, "scalars=500,images=0" keeps 500 scalars and all images. Most users should not need to set this flag. (default: '')

So if you want to have a slider of 100 images, use:

tensorboard --samples_per_plugin images=100

3
  • 2
    exactly what I was looking for. thnx! Commented Dec 5, 2018 at 16:56
  • happy to help. :)
    – Phúc Lê
    Commented May 27, 2019 at 3:54
  • For people stumbling across this question, this is the updated answer
    – tnwei
    Commented May 29, 2021 at 5:00
11

I managed to do this by changing this line in TensorBoard backend

3
  • 3
    I would recommend that you link to a specific commit instead of master, as the line reference is likely to break otherwise -- I think it already did.
    – Martin R.
    Commented Sep 18, 2017 at 10:02
  • Sorry, how could I change the tensorboard backend code? I am in Ubuntu but cannot find the source code path... Thank you!
    – ch271828n
    Commented Jan 28, 2018 at 23:57
  • @Turtle Please also see this answer: stackoverflow.com/a/43743761/2184122 to find the code, do a 'which python'. Then cd into that directory and navigate into the subdirectories. You will need write permissions to make a change. Commented May 23, 2018 at 23:18
7

This question is covered in the FAQ:

Is my data being downsampled? Am I really seeing all the data?

TensorBoard uses reservoir sampling to downsample your data so that it can be loaded into RAM. You can modify the number of elements it will keep per tag in tensorboard/backend/application.py. See this StackOverflow question for some more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.