| 281 | REGISTER_GRADIENT_OP("Sigmoid", SigmoidGrad); |
| 282 | |
| 283 | Status SignGrad(const Scope& scope, const Operation& op, |
| 284 | const std::vector<Output>& grad_inputs, |
| 285 | std::vector<Output>* grad_outputs) { |
| 286 | auto shape = Shape(scope, op.input(0)); |
| 287 | auto zero = Cast(scope, Const(scope, 0.0), op.input(0).type()); |
| 288 | auto dx = Fill(scope, shape, zero); |
| 289 | grad_outputs->push_back(dx); |
| 290 | return scope.status(); |
| 291 | } |
| 292 | REGISTER_GRADIENT_OP("Sign", SignGrad); |
| 293 | |
| 294 | Status SinGrad(const Scope& scope, const Operation& op, |