MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ConvertNodeDefsToGraph

Function ConvertNodeDefsToGraph

tensorflow/core/graph/graph_constructor.cc:1449–1462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1447}
1448
1449Status ConvertNodeDefsToGraph(const GraphConstructorOptions& opts,
1450 gtl::ArraySlice<NodeDef> nodes, Graph* g) {
1451 ShapeRefiner refiner(TF_GRAPH_DEF_VERSION, g->op_registry());
1452 // TODO(irving): Copy will go away once NodeInfo exists
1453 std::vector<const NodeDef*> node_defs;
1454 node_defs.reserve(nodes.size());
1455 for (const auto& n : nodes) {
1456 node_defs.push_back(&n);
1457 }
1458 return GraphConstructor::Construct(opts, node_defs, nullptr, nullptr, g,
1459 &refiner, /*return_tensors=*/nullptr,
1460 /*return_nodes=*/nullptr,
1461 /*missing_unused_input_map_keys=*/nullptr);
1462}
1463
1464Status ImportGraphDef(const ImportGraphDefOptions& opts, const GraphDef& gdef,
1465 Graph* g, ShapeRefiner* refiner,

Callers 5

CreateMethod · 0.85
OptimizeFunction · 0.85
FunctionDefToBodyHelperFunction · 0.85
RunFunctionMethod · 0.85

Calls 4

op_registryMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by 3

CreateMethod · 0.68
OptimizeFunction · 0.68
RunFunctionMethod · 0.68