Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix relu grad
Browse files Browse the repository at this point in the history
  • Loading branch information
Anirudh Acharya committed Mar 1, 2019
1 parent 0ffb3fd commit a100765
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/operator/mshadow_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ namespace isnan_typed {

MXNET_UNARY_MATH_OP_NC(relu, isnan_typed::IsNan(a) || (a > DType(0)) ? a : DType(0));

MXNET_UNARY_MATH_OP_NC(relu_grad, a > DType(0) ? DType(1) : DType(0));
MXNET_UNARY_MATH_OP_NC(relu_grad, isnan_typed::IsNan(a) || a > DType(0) ? DType(1) : DType(0));

/*! \brief used for computing binary operator maximum */
struct maximum : public mxnet_op::tunable {
Expand Down

0 comments on commit a100765

Please sign in to comment.