def summarize_gradients(grads, summary_collection="tflearn_summ"):
""" summarize_gradients.
Arguemnts:
grads: list of `Tensor`. The gradients to monitor.
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'
"""
summaries.add_gradients_summary(grads, "", "", summary_collection)
return merge_summary(tf.get_collection(summary_collection))
评论列表
文章目录