如何在 TensorFlow 中手动创建文本摘要? [英] How to manually create text summaries in TensorFlow?
问题描述
首先,我已经知道如何手动添加浮动或图像摘要.我可以手动构建一个 tf.Summary
protobuf.但是文本摘要呢?我查看摘要 protobuf 的定义 here,但我在那里找不到字符串"值选项.
First of all, I already know how to manually add float or image summaries. I can construct a tf.Summary
protobuf manually. But what about text summaries? I look at the definition for summary protobuf here, but I don't find a "string" value option there.
推荐答案
TensorBoard 的文本插件提供了一种 pb
方法,可让您在 TensorFlow 环境之外创建文本摘要.https://github.com/tensorflow/张量板/blob/master/tensorboard/plugins/text/summary.py#L74
TensorBoard's text plugin offers a pb
method that lets you create text summaries outside of a TensorFlow environment.
https://github.com/tensorflow/tensorboard/blob/master/tensorboard/plugins/text/summary.py#L74
示例用法:
import tensorboard as tb
text_summary_proto = tb.summary.pb('fooTag', 'text data')
这篇关于如何在 TensorFlow 中手动创建文本摘要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!