Python tensorflow.core.framework.summary_pb2.SummaryDescription() Examples
The following are 9
code examples of tensorflow.core.framework.summary_pb2.SummaryDescription().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
tensorflow.core.framework.summary_pb2
, or try the search function
.
Example #1
Source File: summary.py From lambda-packs with MIT License | 6 votes |
def get_summary_description(node_def): """Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description. Args: node_def: the node_def_pb2.NodeDef of a TensorSummary op Returns: a summary_pb2.SummaryDescription Raises: ValueError: if the node is not a summary op. """ if node_def.op != 'TensorSummary': raise ValueError("Can't get_summary_description on %s" % node_def.op) description_str = _compat.as_str_any(node_def.attr['description'].s) summary_description = SummaryDescription() _json_format.Parse(description_str, summary_description) return summary_description
Example #2
Source File: summary.py From auto-alt-text-lambda-api with MIT License | 6 votes |
def get_summary_description(node_def): """Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description. Args: node_def: the node_def_pb2.NodeDef of a TensorSummary op Returns: a summary_pb2.SummaryDescription Raises: ValueError: if the node is not a summary op. """ if node_def.op != 'TensorSummary': raise ValueError("Can't get_summary_description on %s" % node_def.op) description_str = _compat.as_str_any(node_def.attr['description'].s) summary_description = SummaryDescription() _json_format.Parse(description_str, summary_description) return summary_description
Example #3
Source File: summary.py From deep_image_model with Apache License 2.0 | 6 votes |
def get_summary_description(node_def): """Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description. Args: node_def: the node_def_pb2.NodeDef of a TensorSummary op Returns: a summary_pb2.SummaryDescription Raises: ValueError: if the node is not a summary op. """ if node_def.op != 'TensorSummary': raise ValueError("Can't get_summary_description on %s" % node_def.op) description_str = _compat.as_str_any(node_def.attr['description'].s) summary_description = SummaryDescription() _json_format.Parse(description_str, summary_description) return summary_description
Example #4
Source File: summary.py From Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda with MIT License | 6 votes |
def get_summary_description(node_def): """Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description. Args: node_def: the node_def_pb2.NodeDef of a TensorSummary op Returns: a summary_pb2.SummaryDescription Raises: ValueError: if the node is not a summary op. """ if node_def.op != 'TensorSummary': raise ValueError("Can't get_summary_description on %s" % node_def.op) description_str = _compat.as_str_any(node_def.attr['description'].s) summary_description = SummaryDescription() _json_format.Parse(description_str, summary_description) return summary_description
Example #5
Source File: summary.py From keras-lambda with MIT License | 6 votes |
def get_summary_description(node_def): """Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated metadata is stored in its NodeDef. This method retrieves the description. Args: node_def: the node_def_pb2.NodeDef of a TensorSummary op Returns: a summary_pb2.SummaryDescription Raises: ValueError: if the node is not a summary op. """ if node_def.op != 'TensorSummary': raise ValueError("Can't get_summary_description on %s" % node_def.op) description_str = _compat.as_str_any(node_def.attr['description'].s) summary_description = SummaryDescription() _json_format.Parse(description_str, summary_description) return summary_description
Example #6
Source File: summary_ops.py From lambda-packs with MIT License | 5 votes |
def tensor_summary( # pylint: disable=invalid-name name, tensor, summary_description=None, collections=None): # pylint: disable=line-too-long """Outputs a `Summary` protocol buffer with a serialized tensor.proto. The generated [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) has one summary value containing the input tensor. Args: name: A name for the generated node. Will also serve as the series name in TensorBoard. tensor: A tensor of any type and shape to serialize. summary_description: Optional summary_pb2.SummaryDescription() collections: Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. Returns: A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer. """ # pylint: enable=line-too-long if summary_description is None: summary_description = summary_pb2.SummaryDescription() description = json_format.MessageToJson(summary_description) with ops.name_scope(name, None, [tensor]) as scope: val = gen_logging_ops._tensor_summary( tensor=tensor, description=description, name=scope) _Collect(val, collections, [ops.GraphKeys.SUMMARIES]) return val
Example #7
Source File: summary_ops.py From auto-alt-text-lambda-api with MIT License | 5 votes |
def tensor_summary( # pylint: disable=invalid-name name, tensor, summary_description=None, collections=None): # pylint: disable=line-too-long """Outputs a `Summary` protocol buffer with a serialized tensor.proto. The generated [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) has one summary value containing the input tensor. Args: name: A name for the generated node. Will also serve as the series name in TensorBoard. tensor: A tensor of any type and shape to serialize. summary_description: Optional summary_pb2.SummaryDescription() collections: Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. Returns: A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer. """ # pylint: enable=line-too-long if summary_description is None: summary_description = summary_pb2.SummaryDescription() description = json_format.MessageToJson(summary_description) with ops.name_scope(name, None, [tensor]) as scope: val = gen_logging_ops._tensor_summary( tensor=tensor, description=description, name=scope) _Collect(val, collections, [ops.GraphKeys.SUMMARIES]) return val
Example #8
Source File: summary_ops.py From deep_image_model with Apache License 2.0 | 5 votes |
def tensor_summary( # pylint: disable=invalid-name name, tensor, summary_description=None, collections=None): # pylint: disable=line-too-long """Outputs a `Summary` protocol buffer with a serialized tensor.proto. The generated [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) has one summary value containing the input tensor. Args: name: A name for the generated node. Will also serve as the series name in TensorBoard. tensor: A tensor of any type and shape to serialize. summary_description: Optional summary_pb2.SummaryDescription() collections: Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. Returns: A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer. """ # pylint: enable=line-too-long if summary_description is None: summary_description = summary_pb2.SummaryDescription() description = json_format.MessageToJson(summary_description) with ops.name_scope(name, None, [tensor]) as scope: val = gen_logging_ops._tensor_summary( tensor=tensor, description=description, name=scope) _Collect(val, collections, [ops.GraphKeys.SUMMARIES]) return val
Example #9
Source File: summary_ops.py From keras-lambda with MIT License | 5 votes |
def tensor_summary( # pylint: disable=invalid-name name, tensor, summary_description=None, collections=None): # pylint: disable=line-too-long """Outputs a `Summary` protocol buffer with a serialized tensor.proto. The generated [`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) has one summary value containing the input tensor. Args: name: A name for the generated node. Will also serve as the series name in TensorBoard. tensor: A tensor of any type and shape to serialize. summary_description: Optional summary_pb2.SummaryDescription() collections: Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. Returns: A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer. """ # pylint: enable=line-too-long if summary_description is None: summary_description = summary_pb2.SummaryDescription() description = json_format.MessageToJson(summary_description) with ops.name_scope(name, None, [tensor]) as scope: val = gen_logging_ops._tensor_summary( tensor=tensor, description=description, name=scope) _Collect(val, collections, [ops.GraphKeys.SUMMARIES]) return val