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

Function UnpackGrad

tensorflow/cc/gradients/array_grad.cc:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57REGISTER_GRADIENT_OP("Pack", PackGrad);
58
59Status UnpackGrad(const Scope& scope, const Operation& op,
60 const std::vector<Output>& grad_inputs,
61 std::vector<Output>* grad_outputs) {
62 int axis;
63 TF_RETURN_IF_ERROR(GetNodeAttr(op.node()->attrs(), "axis", &axis));
64 grad_outputs->push_back(Stack(scope, grad_inputs, Stack::Axis(axis)));
65 return scope.status();
66}
67REGISTER_GRADIENT_OP("Unpack", UnpackGrad);
68
69Status IdentityGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 7

StackClass · 0.85
GetNodeAttrFunction · 0.50
AxisClass · 0.50
attrsMethod · 0.45
nodeMethod · 0.45
push_backMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected