diff options
author | Peter Hawkins <phawkins@google.com> | 2017-04-25 13:58:56 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-25 15:09:52 -0700 |
commit | 71425b5713494546cf0e2471d24dcd83e5765473 (patch) | |
tree | 457efd0ffbd19a3e5b4e1252de58d63c50eb5f60 /tensorflow/core/graph/graph.cc | |
parent | bea22beffffd5c9fb4c8bac679b5b753d80a30f6 (diff) |
Split graph_to_functiondef into its own library.
Add a non-const overload of Graph::input_node().
Fix comment in description of Merge op.
Change: 154225918
Diffstat (limited to 'tensorflow/core/graph/graph.cc')
-rw-r--r-- | tensorflow/core/graph/graph.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tensorflow/core/graph/graph.cc b/tensorflow/core/graph/graph.cc index c19764d082..fae9f26f76 100644 --- a/tensorflow/core/graph/graph.cc +++ b/tensorflow/core/graph/graph.cc @@ -199,7 +199,7 @@ Status Node::input_edges(std::vector<const Edge*>* input_edges) const { return Status::OK(); } -Status Node::input_node(int idx, const Node** n) const { +Status Node::input_node(int idx, Node** n) const { const Edge* e; TF_RETURN_IF_ERROR(input_edge(idx, &e)); if (e == nullptr) { @@ -210,6 +210,13 @@ Status Node::input_node(int idx, const Node** n) const { return Status::OK(); } +Status Node::input_node(int idx, const Node** const_n) const { + Node* n; + TF_RETURN_IF_ERROR(input_node(idx, &n)); + *const_n = n; + return Status::OK(); +} + // Node::Properties Node::Properties::Properties(const OpDef* op_def, const NodeDef& node_def, |