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

Function RemoveAttributes

tensorflow/tools/graph_transforms/transform_utils.cc:171–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void RemoveAttributes(const GraphDef& input_graph_def,
172 const std::vector<string>& attributes,
173 GraphDef* output_graph_def) {
174 output_graph_def->mutable_node()->Clear();
175 for (const NodeDef& node : input_graph_def.node()) {
176 NodeDef* new_node = output_graph_def->mutable_node()->Add();
177 *new_node = node;
178 for (const string& attribute : attributes) {
179 new_node->mutable_attr()->erase(attribute);
180 }
181 }
182}
183
184Status SortByExecutionOrder(const GraphDef& input_graph_def,
185 GraphDef* output_graph_def) {

Callers 3

SparsifyGatherFunction · 0.85
TestRemoveAttributesMethod · 0.85
FoldConstantsFunction · 0.85

Calls 4

ClearMethod · 0.45
nodeMethod · 0.45
AddMethod · 0.45
eraseMethod · 0.45

Tested by 1

TestRemoveAttributesMethod · 0.68