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

Method MainVariables

tensorflow/core/grappler/grappler_item.cc:69–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69std::vector<const NodeDef*> GrapplerItem::MainVariables() const {
70 std::vector<const NodeDef*> fanin = ComputeTransitiveFanin(graph, init_ops);
71 std::vector<const NodeDef*> vars;
72 for (const NodeDef* node : fanin) {
73 if (IsVariable(*node)) {
74 vars.push_back(node);
75 }
76 }
77 return vars;
78}
79
80std::unordered_set<string> GrapplerItem::NodesToPreserve() const {
81 std::unordered_set<string> result;

Callers 1

InitializeMethod · 0.80

Calls 3

ComputeTransitiveFaninFunction · 0.70
IsVariableFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected