| 394 | REGISTER_GRADIENT_OP("DepthToSpace", DepthToSpaceGrad); |
| 395 | |
| 396 | Status MirrorPadGrad(const Scope& scope, const Operation& op, |
| 397 | const std::vector<Output>& grad_inputs, |
| 398 | std::vector<Output>* grad_outputs) { |
| 399 | string mode; |
| 400 | TF_RETURN_IF_ERROR(GetNodeAttr(op.node()->attrs(), "mode", &mode)); |
| 401 | grad_outputs->push_back(tensorflow::ops::internal::MirrorPadGrad( |
| 402 | scope, grad_inputs[0], op.input(1), mode)); |
| 403 | grad_outputs->push_back(NoGradient()); |
| 404 | return scope.status(); |
| 405 | } |
| 406 | REGISTER_GRADIENT_OP("MirrorPad", MirrorPadGrad); |
| 407 | |
| 408 | // TODO(suharshs): b/34770860. This gradient was within 1e-3 but not 1e-4. |