This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
nihui
/
ncnn
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
46
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
add comment for alpha beta in hardswish and hardsigmoid compared to tf/pytorch implementation (
#2859
)
tags/20210507
songqun
GitHub
5 years ago
parent
f4676207d7
commit
ad1012bcda
No known key found for this signature in database
GPG Key ID:
4AEE18F83AFDEB23
2 changed files
with
4 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
src/layer/hardsigmoid.cpp
+2
-0
src/layer/hardswish.cpp
+ 2
- 0
src/layer/hardsigmoid.cpp
View File
@@ -24,6 +24,8 @@ HardSigmoid::HardSigmoid()
int HardSigmoid::load_param(const ParamDict& pd)
{
// tensorflow uses alpha,beta = 0.2, 0.5
// pytorch uses alpha,beta = 1/6, 0.5
alpha = pd.get(0, 0.2f);
beta = pd.get(1, 0.5f);
lower = -beta / alpha;
+ 2
- 0
src/layer/hardswish.cpp
View File
@@ -24,6 +24,8 @@ HardSwish::HardSwish()
int HardSwish::load_param(const ParamDict& pd)
{
// Note that tensorflow/pytorch use alpha,beta = 1/6, 0.5, not the default value here.
// You can setup them manually in .param file.
alpha = pd.get(0, 0.2f);
beta = pd.get(1, 0.5f);
lower = -beta / alpha;
Write
Preview
Loading…
Cancel
Save