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

Function AddGrad

tensorflow/cc/gradients/math_grad.cc:392–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392Status AddGrad(const Scope& scope, const Operation& op,
393 const std::vector<Output>& grad_inputs,
394 std::vector<Output>* grad_outputs) {
395 // y = x_1 + x_2
396 // dy/dx_1 = dy/dx_2 = 1
397 auto gx_1 = Identity(scope, grad_inputs[0]);
398 auto gx_2 = Identity(scope, grad_inputs[0]);
399 return BinaryGradCommon(scope, op, grad_outputs, gx_1, gx_2);
400}
401REGISTER_GRADIENT_OP("Add", AddGrad);
402REGISTER_GRADIENT_OP("AddV2", AddGrad);
403

Callers

nothing calls this directly

Calls 2

BinaryGradCommonFunction · 0.85
IdentityFunction · 0.50

Tested by

no test coverage detected