简体   繁体   English

Tensorboard:无标量值

[英]Tensorboard: None Scalar Value

I'm currently struggling with a non-trivial scalar in tensorboard.我目前正在与张量板上的一个重要标量作斗争。 The only peculiarity is that sometimes it cannot be defined (ie it has None value).唯一的特点是有时它不能被定义(即它有None值)。

I would like to see it on my tensorboard and don't find the following workarounds acceptable:我想在我的张量板上看到它,但不接受以下解决方法:

  1. Simply don't write the value .根本不写 value If you do so, you won't have a "gap" or any other noticeable mark on your graph (ie you won't see the value is missing if you have lots of data)如果这样做,您的图表上将不会出现“差距”或任何其他明显标记(即,如果您有大量数据,您将不会看到缺少值)
  2. Simply write 0 .只需写0 0 and None values of the metric have different meaning指标的0None值具有不同的含义
  3. Write a predefined value.写入预定义的值。 This is somehow acceptable, but it will influence the smoothed value and is not particularly elegant.这在某种程度上是可以接受的,但它会影响平滑值并且不是特别优雅。

The current tensorboard API does not let me achieve what I want, so I'm all ears to your workaround suggestions.当前的张量板 API 并没有让我实现我想要的,所以我完全听从你的解决方法建议。

One of the possible solutions might be to have the shape of the tick to be different, like in the following image from this question , but I can't find the API to achieve that.一种可能的解决方案可能是使刻度线的形状不同,如下图所示,但我找不到API来实现这一点。

无值的所需外观

Thank You for Your time, looking forward to Your replies.感谢您的宝贵时间,期待您的回复。

Just write numpy.nan and it should meet all your needs:只需编写numpy.nan满足您的所有需求:

  1. It won't affect the smoothed value.它不会影响平滑值。
  2. The mark will be different.标记会有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM