Tensorflow渴望模式支持文本摘要

时间:2018-11-08 06:04:15

标签: python tensorflow tensorboard eager

我正在尝试使用启用了快速模式的tensorflow来总结文本,为此,我正在使用以下代码:

writer = summary_ops_v2.create_file_writer('some_path', flush_millis=10000)
writer.set_as_default()

tensor = tf.convert_to_tensor("Some text")
meta = tf.SummaryMetadata()
meta.plugin_data.plugin_name = "text"

with summary_ops_v2.always_record_summaries():
   summary_ops_v2.generic(name="text", tensor=tensor)

但是在查看张量板时会创建事件,但不会保存文本(Tensorboard image

尝试使用tf.make_tensor_proto,但也没有用。

writer = summary_ops_v2.create_file_writer('some_path', flush_millis=10000)
writer.set_as_default()

tensor = tf.make_tensor_proto("Some text", dtype=tf.string)
meta = tf.SummaryMetadata()
meta.plugin_data.plugin_name = "text"

with summary_ops_v2.always_record_summaries():
   summary_ops_v2.generic(name="text", tensor=tensor)

1 个答案:

答案 0 :(得分:0)

我认为这可能是一个错误。我更新到tensorflow 1.13.1,并正确显示了摘要。