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

Function MirrorPadGrad

tensorflow/cc/gradients/array_grad.cc:396–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394REGISTER_GRADIENT_OP("DepthToSpace", DepthToSpaceGrad);
395
396Status 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}
406REGISTER_GRADIENT_OP("MirrorPad", MirrorPadGrad);
407
408// TODO(suharshs): b/34770860. This gradient was within 1e-3 but not 1e-4.

Callers 1

TEST_FFunction · 0.70

Calls 7

NoGradientFunction · 0.85
GetNodeAttrFunction · 0.50
attrsMethod · 0.45
nodeMethod · 0.45
push_backMethod · 0.45
inputMethod · 0.45
statusMethod · 0.45

Tested by 1

TEST_FFunction · 0.56