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:
(node_def)
| 408 | |
| 409 | @tf_export(v1=['summary.get_summary_description']) |
| 410 | def get_summary_description(node_def): |
| 411 | """Given a TensorSummary node_def, retrieve its SummaryDescription. |
| 412 | |
| 413 | When a Summary op is instantiated, a SummaryDescription of associated |
| 414 | metadata is stored in its NodeDef. This method retrieves the description. |
| 415 | |
| 416 | Args: |
| 417 | node_def: the node_def_pb2.NodeDef of a TensorSummary op |
| 418 | |
| 419 | Returns: |
| 420 | a summary_pb2.SummaryDescription |
| 421 | |
| 422 | Raises: |
| 423 | ValueError: if the node is not a summary op. |
| 424 | |
| 425 | @compatibility(eager) |
| 426 | Not compatible with eager execution. To write TensorBoard |
| 427 | summaries under eager execution, use `tf.contrib.summary` instead. |
| 428 | @end_compatibility |
| 429 | """ |
| 430 | |
| 431 | if node_def.op != 'TensorSummary': |
| 432 | raise ValueError("Can't get_summary_description on %s" % node_def.op) |
| 433 | description_str = _compat.as_str_any(node_def.attr['description'].s) |
| 434 | summary_description = SummaryDescription() |
| 435 | _json_format.Parse(description_str, summary_description) |
| 436 | return summary_description |