tf.summary.scalar

tf.summary.scalar(
    name,
    tensor,
    collections=None,
    family=None
)

输出包含单个标量值的summary protocol buffer,生成的summary有一个tensor.proto,包含输入张量的原式。

参数:

  • name:生成的节点的名称。也将作为系列名称在TensorBoard。
  • tensor: 包含单个值的实数张量。
  • collections: 图形集合键的可选列表,新的summary op被添加到这些集合中,默认为[GraphKeys.SUMMARIES]。
  • family: 可选的;如果提供,用作摘要标记名称的前缀,它控制用于在Tensorboard上显示的选项卡名称。

返回值:

  • 字符串类型的标量张量,其中包含一个tensor.proto。

异常:

  • ValueError: If tensor has the wrong shape or type.

原链接:https://tensorflow.google.cn/versions/r1.9/api_docs/python/tf/summary/scalar?hl=en

猜你喜欢

转载自blog.csdn.net/weixin_36670529/article/details/91440714