Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
2c0b0f0d
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2c0b0f0d
编写于
6月 24, 2020
作者:
L
littletomatodonkey
提交者:
GitHub
6月 24, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #179 from littletomatodonkey/add_log_int
fix hrnet name
上级
27f5ac5a
5a376837
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
ppcls/modeling/architectures/hrnet.py
ppcls/modeling/architectures/hrnet.py
+13
-13
未找到文件。
ppcls/modeling/architectures/hrnet.py
浏览文件 @
2c0b0f0d
#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
#
#Licensed under the Apache License, Version 2.0 (the "License");
#
Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#
you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
#
#Unless required by applicable law or agreed to in writing, software
#
Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#
distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#
See the License for the specific language governing permissions and
#limitations under the License.
#
limitations under the License.
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
__future__
import
division
from
__future__
import
division
...
@@ -74,7 +74,7 @@ class HRNet():
...
@@ -74,7 +74,7 @@ class HRNet():
tr3
=
self
.
transition_layer
(
st3
,
channels_3
,
channels_4
,
name
=
'tr3'
)
tr3
=
self
.
transition_layer
(
st3
,
channels_3
,
channels_4
,
name
=
'tr3'
)
st4
=
self
.
stage
(
tr3
,
num_modules_4
,
channels_4
,
name
=
'st4'
)
st4
=
self
.
stage
(
tr3
,
num_modules_4
,
channels_4
,
name
=
'st4'
)
#classification
#
classification
last_cls
=
self
.
last_cls_out
(
x
=
st4
,
name
=
'cls_head'
)
last_cls
=
self
.
last_cls_out
(
x
=
st4
,
name
=
'cls_head'
)
y
=
last_cls
[
0
]
y
=
last_cls
[
0
]
last_num_filters
=
[
256
,
512
,
1024
]
last_num_filters
=
[
256
,
512
,
1024
]
...
@@ -273,7 +273,7 @@ class HRNet():
...
@@ -273,7 +273,7 @@ class HRNet():
input
=
conv
,
input
=
conv
,
num_channels
=
num_filters
,
num_channels
=
num_filters
,
reduction_ratio
=
16
,
reduction_ratio
=
16
,
name
=
name
+
'_fc'
)
name
=
"fc"
+
name
)
return
fluid
.
layers
.
elementwise_add
(
x
=
residual
,
y
=
conv
,
act
=
'relu'
)
return
fluid
.
layers
.
elementwise_add
(
x
=
residual
,
y
=
conv
,
act
=
'relu'
)
def
bottleneck_block
(
self
,
def
bottleneck_block
(
self
,
...
@@ -312,7 +312,7 @@ class HRNet():
...
@@ -312,7 +312,7 @@ class HRNet():
input
=
conv
,
input
=
conv
,
num_channels
=
num_filters
*
4
,
num_channels
=
num_filters
*
4
,
reduction_ratio
=
16
,
reduction_ratio
=
16
,
name
=
name
+
'_fc'
)
name
=
"fc"
+
name
)
return
fluid
.
layers
.
elementwise_add
(
x
=
residual
,
y
=
conv
,
act
=
'relu'
)
return
fluid
.
layers
.
elementwise_add
(
x
=
residual
,
y
=
conv
,
act
=
'relu'
)
def
squeeze_excitation
(
self
,
def
squeeze_excitation
(
self
,
...
@@ -325,7 +325,7 @@ class HRNet():
...
@@ -325,7 +325,7 @@ class HRNet():
stdv
=
1.0
/
math
.
sqrt
(
pool
.
shape
[
1
]
*
1.0
)
stdv
=
1.0
/
math
.
sqrt
(
pool
.
shape
[
1
]
*
1.0
)
squeeze
=
fluid
.
layers
.
fc
(
squeeze
=
fluid
.
layers
.
fc
(
input
=
pool
,
input
=
pool
,
size
=
num_channels
/
reduction_ratio
,
size
=
int
(
num_channels
/
reduction_ratio
)
,
act
=
'relu'
,
act
=
'relu'
,
param_attr
=
fluid
.
param_attr
.
ParamAttr
(
param_attr
=
fluid
.
param_attr
.
ParamAttr
(
initializer
=
fluid
.
initializer
.
Uniform
(
-
stdv
,
stdv
),
initializer
=
fluid
.
initializer
.
Uniform
(
-
stdv
,
stdv
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录