diff options
Diffstat (limited to 'tensorflow/core/framework/function_testlib.cc')
-rw-r--r-- | tensorflow/core/framework/function_testlib.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tensorflow/core/framework/function_testlib.cc b/tensorflow/core/framework/function_testlib.cc index 2b5a0fe1bb..a8eecc1a63 100644 --- a/tensorflow/core/framework/function_testlib.cc +++ b/tensorflow/core/framework/function_testlib.cc @@ -45,13 +45,12 @@ GraphDef GDef(gtl::ArraySlice<NodeDef> nodes, } // Helper to construct a NodeDef. -NodeDef NDef(const string& name, const string& op, - gtl::ArraySlice<string> inputs, +NodeDef NDef(StringPiece name, StringPiece op, gtl::ArraySlice<string> inputs, gtl::ArraySlice<std::pair<string, FDH::AttrValueWrapper>> attrs, const string& device) { NodeDef n; - n.set_name(name); - n.set_op(op); + n.set_name(name.ToString()); + n.set_op(op.ToString()); for (const auto& in : inputs) n.add_input(in); n.set_device(device); for (auto na : attrs) n.mutable_attr()->insert({na.first, na.second.proto}); |