diff options
author | Geoffrey Irving <geoffreyi@google.com> | 2017-05-16 16:08:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-16 16:12:05 -0700 |
commit | 749e5cc18381f7a5ec174673f76e20aead8529c6 (patch) | |
tree | 4b92d36c9e1d8e59e34fd8d08e7f11fbda1315d9 /tensorflow/core/graph/graph.cc | |
parent | ed5d05d8b53425ef98aad129a60143a5011a4288 (diff) |
Reduce direct references to NodeDef in favor of Node and AttrSlice
This is one step towards replacing in-memory use of NodeDef with a customized
NodeInfo class. There are still quite a few Node::def() references, but far fewer than before. Those remaining require more work, either because they are part of kernel registration (which is a bunch of functions), copy and modify the NodeDef, etc. Follow-on CLs will remove more.
RELNOTES: n/a
PiperOrigin-RevId: 156244933
Diffstat (limited to 'tensorflow/core/graph/graph.cc')
-rw-r--r-- | tensorflow/core/graph/graph.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/graph/graph.cc b/tensorflow/core/graph/graph.cc index d765959ca0..9066de5668 100644 --- a/tensorflow/core/graph/graph.cc +++ b/tensorflow/core/graph/graph.cc @@ -78,7 +78,7 @@ string Node::DebugString() const { } else { strings::StrAppend(&ret, " op device:"); strings::StrAppend(&ret, "{", assigned_device_name_, "}"); - strings::StrAppend(&ret, " def:{", SummarizeNodeDef(def()), "}}"); + strings::StrAppend(&ret, " def:{", SummarizeNode(*this), "}}"); } return ret; } @@ -474,7 +474,7 @@ void Graph::ToGraphDefSubRange(GraphDef* graph_def, int from_node_id) const { for (size_t i = 0; i < inputs.size(); ++i) { const Edge* edge = inputs[i]; if (edge == nullptr) { - node_def->add_input(node->def().input(i)); + node_def->add_input(node->requested_inputs()[i]); } else { const Node* src = edge->src(); if (!src->IsOp()) continue; |