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

Method BackpropAlongEdge

tensorflow/cc/framework/gradients.cc:151–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 grad_outputs_(grad_outputs) {}
150
151Status SymbolicGradientBuilder::BackpropAlongEdge(const Output& dst_grad,
152 const Output& src) {
153 if (src.node() == nullptr) {
154 return errors::Internal("Attempted to backprop along an invalid edge.");
155 }
156 auto iter = backprops_.find(src);
157 if (iter != backprops_.end()) {
158 auto* grads = &iter->second;
159 grads->push_back(dst_grad);
160 if (--pending_[src.node()->id()] == 0) {
161 ready_.push_back(src.node());
162 }
163 }
164 return Status::OK();
165}
166
167std::vector<bool> SymbolicGradientBuilder::GetReachableNodes() {
168 std::vector<bool> reachable_nodes(scope_.graph()->num_node_ids(), false);

Callers

nothing calls this directly

Calls 6

InternalFunction · 0.85
nodeMethod · 0.45
findMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected