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

Function SpaceToBatchGrad

tensorflow/cc/gradients/array_grad.cc:326–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324REGISTER_GRADIENT_OP("PadV2", PadGrad<true>);
325
326Status SpaceToBatchGrad(const Scope& scope, const Operation& op,
327 const std::vector<Output>& grad_inputs,
328 std::vector<Output>* grad_outputs) {
329 int block_size;
330 TF_RETURN_IF_ERROR(
331 GetNodeAttr(op.node()->attrs(), "block_size", &block_size));
332 grad_outputs->push_back(
333 BatchToSpace(scope, grad_inputs[0], op.input(1), block_size));
334 grad_outputs->push_back(NoGradient());
335 return scope.status();
336}
337REGISTER_GRADIENT_OP("SpaceToBatch", SpaceToBatchGrad);
338
339Status SpaceToBatchNDGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected