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

Method RemoveControlEdge

tensorflow/core/graph/graph.cc:571–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569}
570
571void Graph::RemoveControlEdge(const Edge* e) {
572 if (!e->src_->IsSource() && !e->dst_->IsSink()) {
573 e->dst_->MaybeCopyOnWrite();
574 string e_src_name = strings::StrCat("^", e->src_->name());
575 auto* inputs = e->dst_->props_->node_def.mutable_input();
576 for (auto it = inputs->begin(); it != inputs->end(); ++it) {
577 if (*it == e_src_name) {
578 inputs->erase(it);
579 break;
580 }
581 }
582 }
583 RemoveEdge(e);
584}
585
586namespace {
587const Edge* FindEdge(const Node* dst, int index) {

Calls 10

RemoveEdgeFunction · 0.85
IsSourceMethod · 0.80
IsSinkMethod · 0.80
MaybeCopyOnWriteMethod · 0.80
nameMethod · 0.65
StrCatFunction · 0.50
mutable_inputMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by 1

TEST_FFunction · 0.64