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

Function SplitVGrad

tensorflow/cc/gradients/array_grad.cc:123–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121REGISTER_GRADIENT_OP("Split", SplitGrad);
122
123Status SplitVGrad(const Scope& scope, const Operation& op,
124 const std::vector<Output>& grad_inputs,
125 std::vector<Output>* grad_outputs) {
126 if (op.num_inputs() < 3) {
127 return errors::InvalidArgument("SplitV requires 3 arguments");
128 }
129 grad_outputs->push_back(Concat(scope, grad_inputs, op.input(2)));
130 for (int i = 0; i < op.num_inputs() - 1; ++i) {
131 grad_outputs->push_back(NoGradient());
132 }
133 return scope.status();
134}
135REGISTER_GRADIENT_OP("SplitV", SplitVGrad);
136
137Status FillGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 7

InvalidArgumentFunction · 0.85
NoGradientFunction · 0.85
ConcatFunction · 0.50
num_inputsMethod · 0.45
push_backMethod · 0.45
inputMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected