Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv
提交
05db8784
O
opencv
项目概览
OpenCV
/
opencv
上一次同步 8 个月
通知
980
Star
71099
Fork
55580
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
05db8784
编写于
11月 29, 2021
作者:
S
Smirnov Egor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix Clip, LeakyReLU, LRN, Split defaults
上级
a6277370
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
4 deletion
+5
-4
modules/dnn/src/layers/lrn_layer.cpp
modules/dnn/src/layers/lrn_layer.cpp
+1
-1
modules/dnn/src/onnx/onnx_importer.cpp
modules/dnn/src/onnx/onnx_importer.cpp
+4
-3
未找到文件。
modules/dnn/src/layers/lrn_layer.cpp
浏览文件 @
05db8784
...
...
@@ -80,7 +80,7 @@ public:
if
(
size
%
2
!=
1
||
size
<=
0
)
CV_Error
(
Error
::
StsBadArg
,
"LRN layer supports only positive odd values for local_size"
);
alpha
=
params
.
get
<
double
>
(
"alpha"
,
1
);
alpha
=
params
.
get
<
double
>
(
"alpha"
,
0.000
1
);
beta
=
params
.
get
<
double
>
(
"beta"
,
0.75
);
bias
=
params
.
get
<
double
>
(
"bias"
,
1
);
normBySize
=
params
.
get
<
bool
>
(
"norm_by_size"
,
true
);
...
...
modules/dnn/src/onnx/onnx_importer.cpp
浏览文件 @
05db8784
...
...
@@ -920,6 +920,7 @@ void ONNXImporter::parseSplit(LayerParams& layerParams, const opencv_onnx::NodeP
layerParams
.
set
(
"num_split"
,
node_proto
.
output_size
());
}
layerParams
.
type
=
"Slice"
;
layerParams
.
set
(
"axis"
,
layerParams
.
get
<
float
>
(
"axis"
,
0
));
addLayer
(
layerParams
,
node_proto
);
}
...
...
@@ -1184,15 +1185,15 @@ void ONNXImporter::parseImageScaler(LayerParams& layerParams, const opencv_onnx:
void
ONNXImporter
::
parseClip
(
LayerParams
&
layerParams
,
const
opencv_onnx
::
NodeProto
&
node_proto
)
{
layerParams
.
type
=
"ReLU6"
;
replaceLayerParam
(
layerParams
,
"min"
,
"min_value"
);
replaceLayerParam
(
layerParams
,
"max"
,
"max_value"
);
layerParams
.
set
(
"min_value"
,
layerParams
.
get
<
float
>
(
"min"
,
-
FLT_MAX
)
);
layerParams
.
set
(
"max_value"
,
layerParams
.
get
<
float
>
(
"max"
,
FLT_MAX
)
);
addLayer
(
layerParams
,
node_proto
);
}
void
ONNXImporter
::
parseLeakyRelu
(
LayerParams
&
layerParams
,
const
opencv_onnx
::
NodeProto
&
node_proto
)
{
layerParams
.
type
=
"ReLU"
;
replaceLayerParam
(
layerParams
,
"alpha"
,
"negative_slope"
);
layerParams
.
set
(
"negative_slope"
,
layerParams
.
get
<
float
>
(
"alpha"
,
0.01
)
);
addLayer
(
layerParams
,
node_proto
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录