| 215 | REGISTER_GRADIENT_OP("CheckNumerics", CheckNumericsGrad); |
| 216 | |
| 217 | Status 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 | } |
| 225 | REGISTER_GRADIENT_OP("Reshape", ReshapeGrad); |
| 226 | |
| 227 | Status ExpandDimsGrad(const Scope& scope, const Operation& op, |