Tensorboard‘s sample_per_plugin

Tensorboard’s sample_per_plugin

Tensorboard’s sample_per_plugin controls the step size of the slider.

Draw the train images to tensorboard:

step = 0
writer = SummaryWriter()
for imgs, labels in train_loader:
    grid = torchvision.utils.make_grid(imgs)
    writer.add_image('train images', grid, step)
    step += 1
writer.close()

The total steps is 156.

The wired thing is it does not show all steps, but only 10 steps: 3, 10, 24, …, 141, 156.
These steps are not evenly distributed from 0 to 156.

Tensorboard‘s sample_per_plugin_第1张图片

There is no such settings as step size on the settings panel.

I googled and found the way to show more steps:

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

tensorboard --samples_per_plugin images=100

This is the slider of images=20:

Tensorboard‘s sample_per_plugin_第2张图片

Tensorboard uses a randomized sampling algorithm to select some samples.

Reference:

  • https://stackoverflow.com/questions/43702546/tensorboard-doesnt-show-all-data-points/
  • https://github.com/tensorflow/tensorboard#is-my-data-being-downsampled-am-i-really-seeing-all-the-data

你可能感兴趣的:(其它,tensorboard,step)