コード例 #1
0
ファイル: summary_ops.py プロジェクト: xzm2004260/tensorflow
def merge_summary(inputs, collections=None, name=None):
    """Merges summaries.

  This op creates a
  [`Summary`](https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/core/framework/summary.proto)
  protocol buffer that contains the union of all the values in the input
  summaries.

  When the Op is run, it reports an `InvalidArgument` error if multiple values
  in the summaries to merge use the same tag.

  Args:
    inputs: A list of `string` `Tensor` objects containing serialized `Summary`
      protocol buffers.
    collections: Optional list of graph collections keys. The new summary op is
      added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
    name: A name for the operation (optional).

  Returns:
    A scalar `Tensor` of type `string`. The serialized `Summary` protocol
    buffer resulting from the merging.
  """
    with ops.op_scope(inputs, name, "MergeSummary") as scope:
        val = gen_summary_ops._merge_summary(inputs=inputs, name=name)
        _Collect(val, collections, [])
    return val
コード例 #2
0
ファイル: summary_ops.py プロジェクト: DapengLan/tensorflow
def merge_summary(inputs, collections=None, name=None):
  """Merges summaries.

  This op creates a
  [`Summary`](https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/core/framework/summary.proto)
  protocol buffer that contains the union of all the values in the input
  summaries.

  When the Op is run, it reports an `InvalidArgument` error if multiple values
  in the summaries to merge use the same tag.

  Args:
    inputs: A list of `string` `Tensor` objects containing serialized `Summary`
      protocol buffers.
    collections: Optional list of graph collections keys. The new summary op is
      added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
    name: A name for the operation (optional).

  Returns:
    A scalar `Tensor` of type `string`. The serialized `Summary` protocol
    buffer resulting from the merging.
  """
  with ops.op_scope(inputs, name, "MergeSummary") as scope:
    val = gen_summary_ops._merge_summary(inputs=inputs, name=name)
    _Collect(val, collections, [])
  return val