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

fix sigmoid implementation bug #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion csrc/velox/functions/numeric_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ struct sigmoid {
template <typename TOutput, typename TInput = TOutput>
FOLLY_ALWAYS_INLINE bool call(TOutput& result, const TInput& x) {
if (x >= 0) {
result = 1 / (1 + exp(x));
result = 1 / (1 + exp(-x));
} else {
const auto z = exp(x);
result = z / (1 + z);
Expand Down