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

Function BatchToSpaceGrad

tensorflow/cc/gradients/array_grad.cc:350–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348REGISTER_GRADIENT_OP("SpaceToBatchND", SpaceToBatchNDGrad);
349
350Status BatchToSpaceGrad(const Scope& scope, const Operation& op,
351 const std::vector<Output>& grad_inputs,
352 std::vector<Output>* grad_outputs) {
353 int block_size;
354 TF_RETURN_IF_ERROR(
355 GetNodeAttr(op.node()->attrs(), "block_size", &block_size));
356 grad_outputs->push_back(
357 SpaceToBatch(scope, grad_inputs[0], op.input(1), block_size));
358 grad_outputs->push_back(NoGradient());
359 return scope.status();
360}
361REGISTER_GRADIENT_OP("BatchToSpace", BatchToSpaceGrad);
362
363Status BatchToSpaceNDGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected