def summarize(value, type, name, summary_collection="tflearn_summ"):
""" summarize.
A custom summarization op.
Arguemnts:
value: `Tensor`. The tensor value to monitor.
type: `str` among 'histogram', 'scalar'. The data monitoring type.
name: `str`. A name for this summary.
summary_collection: A collection to add this summary to and
also used for returning a merged summary over all its elements.
Default: 'tflearn_summ'.
Returns:
`Tensor`. Merge of all summary in 'summary_collection'.
"""
if tf012:
name = name.replace(':', '_')
summaries.get_summary(type, name, value, summary_collection)
return merge_summary(tf.get_collection(summary_collection))
评论列表
文章目录