Browse Source

clean code

pull/640/head
13291271729 3 years ago
parent
commit
80e9e63207
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      parser/tensorflow/graph_functiondef.h
  2. +2
    -2
      parser/tensorflow/graph_optimizer.cc

+ 1
- 1
parser/tensorflow/graph_functiondef.h View File

@@ -28,7 +28,6 @@
#include "proto/tensorflow/graph.pb.h"
#include "register/register_error_codes.h"

namespace ge {
using domi::tensorflow::AttrValue;
using domi::tensorflow::AttrValue_ListValue;
using domi::tensorflow::DataType;
@@ -40,6 +39,7 @@ using std::string;
using std::to_string;
using std::vector;

namespace ge {
class GraphToFunctionDef {
public:
static domi::Status RecordArg(ge::ComputeGraphPtr graph,


+ 2
- 2
parser/tensorflow/graph_optimizer.cc View File

@@ -202,9 +202,9 @@ Status ParserGraphOptimizer::UpdateGraph(vector<NodePtr> &nodes) {
"insert node to sub_graph failed.");
GE_CHK_STATUS_RET(LinkInnerAnchor(node_map), "Link inner anchor failed.");

std::unique_ptr<NodeDef> node_def = std::make_unique<NodeDef>(); // tensorflow NodeDef
std::unique_ptr<NodeDef> node_def(new (std::nothrow) NodeDef()); // tensorflow NodeDef
GE_CHECK_NOTNULL(node_def);
std::unique_ptr<FunctionDefLibrary> func_def_lib = std::make_unique<FunctionDefLibrary>();
std::unique_ptr<FunctionDefLibrary> func_def_lib(new (std::nothrow) FunctionDefLibrary());
GE_CHECK_NOTNULL(func_def_lib);
// convert graph to FunctionDef
if (nodes.size() == 0) {


Loading…
Cancel
Save