chrishkchris commented on issue #488: SINGA -475 add Sign operator to singa
URL: https://github.com/apache/incubator-singa/pull/488#issuecomment-519866518
 
 
   This is what tensorflow use:
   ```cpp
   Status SignGrad(const Scope& scope, const Operation& op,
                   const std::vector<Output>& grad_inputs,
                   std::vector<Output>* grad_outputs) {
     auto shape = Shape(scope, op.input(0));
     auto zero = Cast(scope, Const(scope, 0.0), op.input(0).type());
     auto dx = Fill(scope, shape, zero);
     grad_outputs->push_back(dx);
     return scope.status();
   }
   REGISTER_GRADIENT_OP("Sign", SignGrad);
   ```
   seems to fill the dx with all zero

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to