Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/operator/mshadow_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ struct xelu_grad {
/*! \brief Exponential Linear Unit */
struct elu {
MSHADOW_XINLINE static real_t Map(real_t x, real_t a) {
return x >= 0.0f ? x : a * (expf(x) - 1.0f);
return x > 0.0f ? x : a * (expf(x) - 1.0f);
}
};

struct elu_grad {
MSHADOW_XINLINE static real_t Map(real_t x, real_t a) {
return x >= 0.0f ? 1.0f : a * expf(x);
return x > 0.0f ? 1.0f : a * expf(x);
}
};

Expand Down