aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/graph_constructor.cc
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2017-05-16 16:08:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-05-16 16:12:05 -0700
commit749e5cc18381f7a5ec174673f76e20aead8529c6 (patch)
tree4b92d36c9e1d8e59e34fd8d08e7f11fbda1315d9 /tensorflow/core/graph/graph_constructor.cc
parented5d05d8b53425ef98aad129a60143a5011a4288 (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_constructor.cc')
-rw-r--r--tensorflow/core/graph/graph_constructor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/graph/graph_constructor.cc b/tensorflow/core/graph/graph_constructor.cc
index 9d4a0a52f7..70087b8fe1 100644
--- a/tensorflow/core/graph/graph_constructor.cc
+++ b/tensorflow/core/graph/graph_constructor.cc
@@ -424,7 +424,7 @@ Status GraphConstructor::ValidateShape(Node* node) {
// For nodes with the _output_shapes atttribute, override the shape.
std::vector<TensorShapeProto> shape_attrs;
const char* kAttrName = "_output_shapes";
- if (!GetNodeAttr(node->def(), kAttrName, &shape_attrs).ok()) {
+ if (!GetNodeAttr(node->attrs(), kAttrName, &shape_attrs).ok()) {
// No _output_shapes attribute, the AddNode call above was sufficient.
return Status::OK();
}
@@ -458,7 +458,7 @@ Status GraphConstructor::ValidateShape(Node* node) {
// functions that are not critical to correct execution but
// would cause graphs to fail if imported after correcting.
//
- const string& op = node->def().op();
+ const string& op = node->type_string();
const std::vector<string> whitelist = {
// To be removed after 2017/03/08.
"RandomShuffleQueue", "PaddingFIFOQueue", "FIFOQueue",