在 TensorBoard 中更改图像滑块步骤

Change images slider step in TensorBoard

TensorBoard 1.1.0 的图像历史。我想更精确地设置滑块的位置(在带有 7 的黑色图像的顶部),以便能够 select 任何一步。现在我只能 select 例如在步骤 2050 或 2810 之间。这可能吗?

也许源代码中某个地方硬编码了常量 10?

我设法通过更改 TensorBoard 后端中的 this 行来做到这一点

这个问题在 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 Whosebug question for some more information.

我在那边回答了这个问题“TensorBoard doesn't show all data points”,但是这个好像比较流行,所以我会在这里引用它。

您不必为此更改源代码,有一个名为 --samples_per_plugin 的标志。

引用 help 命令

--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: '')

因此,如果您想要一个包含 100 张图片的滑块,请使用:

tensorboard --samples_per_plugin images=100