Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_cpu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_backend_cpu
Merge requests
!69
Improve Sigmoid
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Improve Sigmoid
oantoni/aidge_backend_cpu:Sigmoid
into
dev
Overview
1
Commits
1
Pipelines
6
Changes
1
Merged
Olivier Antoni
requested to merge
oantoni/aidge_backend_cpu:Sigmoid
into
dev
10 months ago
Overview
1
Commits
1
Pipelines
6
Changes
1
Expand
Context
Improve Sigmoid implementation for CPU backend to avoid numerical instabilities
0
0
Merge request reports
Compare
dev
version 1
b565866f
10 months ago
dev (base)
and
latest version
latest version
0579d407
1 commit,
10 months ago
version 1
b565866f
1 commit,
10 months ago
1 file
+
5
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
include/aidge/backend/cpu/operator/SigmoidImpl_forward_kernels.hpp
+
5
−
1
Options
@@ -27,7 +27,11 @@ void SigmoidImpl_cpu_forward_kernel(std::size_t inputLenght,
//#pragma omp parallel for if (inputLenght > 1024)
for
(
std
::
size_t
i
=
0
;
i
<
inputLenght
;
++
i
)
{
output
[
i
]
=
O
(
1
)
/
(
O
(
1
)
+
std
::
exp
(
-
input
[
i
]));
if
(
input
[
i
]
>
I
(
0
))
{
output
[
i
]
=
O
(
1
)
/
(
O
(
1
)
+
std
::
exp
(
-
input
[
i
]));
}
else
{
output
[
i
]
=
std
::
exp
(
input
[
i
])
/
(
O
(
1
)
+
std
::
exp
(
input
[
i
]));
}
}
}
Loading