| 100 | string SummarizeNode(const Node& node) { return SummarizeNodeDef(node.def()); } |
| 101 | |
| 102 | string SummarizeNodeDef(const NodeDef& node_def) { |
| 103 | string ret = strings::StrCat(errors::FormatNodeNameForError(node_def.name()), |
| 104 | " = ", node_def.op(), "["); |
| 105 | strings::StrAppend(&ret, SummarizeAttrsHelper(node_def, node_def.device())); |
| 106 | strings::StrAppend(&ret, "]("); |
| 107 | |
| 108 | // Output inputs, including control inputs, verbatim. |
| 109 | bool first = true; |
| 110 | for (const string& input : node_def.input()) { |
| 111 | if (!first) strings::StrAppend(&ret, ", "); |
| 112 | first = false; |
| 113 | strings::StrAppend(&ret, input); |
| 114 | } |
| 115 | strings::StrAppend(&ret, ")"); |
| 116 | return ret; |
| 117 | } |
| 118 | |
| 119 | string SummarizeAttrs(const NodeDef& node_def) { |
| 120 | return SummarizeAttrsHelper(node_def, node_def.device()); |