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

Function ReshapeGrad

tensorflow/cc/gradients/array_grad.cc:217–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215REGISTER_GRADIENT_OP("CheckNumerics", CheckNumericsGrad);
216
217Status ReshapeGrad(const Scope& scope, const Operation& op,
218 const std::vector<Output>& grad_inputs,
219 std::vector<Output>* grad_outputs) {
220 auto input_shape = Shape(scope, op.input(0));
221 grad_outputs->push_back(Reshape(scope, grad_inputs[0], input_shape));
222 grad_outputs->push_back(NoGradient());
223 return scope.status();
224}
225REGISTER_GRADIENT_OP("Reshape", ReshapeGrad);
226
227Status ExpandDimsGrad(const Scope& scope, const Operation& op,

Callers

nothing calls this directly

Calls 6

NoGradientFunction · 0.85
ShapeClass · 0.50
ReshapeFunction · 0.50
inputMethod · 0.45
push_backMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected