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

Function GatherNdGrad

tensorflow/cc/gradients/array_grad.cc:192–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190REGISTER_GRADIENT_OP("MatrixBandPart", MatrixBandPartGrad);
191
192Status GatherNdGrad(const Scope& scope, const Operation& op,
193 const std::vector<Output>& grad_inputs,
194 std::vector<Output>* grad_outputs) {
195 auto ref = op.input(0);
196 auto ref_shape = Shape(scope, ref);
197 auto indices = op.input(1);
198 grad_outputs->push_back(ScatterNd(scope, indices, grad_inputs[0], ref_shape));
199 grad_outputs->push_back(NoGradient());
200 return scope.status();
201}
202REGISTER_GRADIENT_OP("GatherNd", GatherNdGrad);
203
204Status CheckNumericsGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 6

ScatterNdFunction · 0.85
NoGradientFunction · 0.85
ShapeClass · 0.50
inputMethod · 0.45
push_backMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected