| 190 | REGISTER_GRADIENT_OP("MatrixBandPart", MatrixBandPartGrad); |
| 191 | |
| 192 | Status 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 | } |
| 202 | REGISTER_GRADIENT_OP("GatherNd", GatherNdGrad); |
| 203 | |
| 204 | Status CheckNumericsGrad(const Scope& scope, const Operation& op, |