Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSeg
提交
2eeb814f
P
PaddleSeg
项目概览
PaddlePaddle
/
PaddleSeg
通知
285
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2eeb814f
编写于
9月 21, 2020
作者:
C
chenguowei01
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update layer_libs
上级
4231b3f7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
10 deletion
+9
-10
dygraph/paddleseg/models/common/layer_libs.py
dygraph/paddleseg/models/common/layer_libs.py
+9
-10
未找到文件。
dygraph/paddleseg/models/common/layer_libs.py
浏览文件 @
2eeb814f
...
@@ -21,10 +21,10 @@ from paddle.nn import SyncBatchNorm as BatchNorm
...
@@ -21,10 +21,10 @@ from paddle.nn import SyncBatchNorm as BatchNorm
from
paddle.nn.layer
import
activation
from
paddle.nn.layer
import
activation
class
ConvB
n
Relu
(
nn
.
Layer
):
class
ConvB
N
Relu
(
nn
.
Layer
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
super
(
ConvB
n
Relu
,
self
).
__init__
()
super
(
ConvB
N
Relu
,
self
).
__init__
()
self
.
conv
=
Conv2d
(
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
)
self
.
conv
=
Conv2d
(
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
)
...
@@ -37,10 +37,10 @@ class ConvBnRelu(nn.Layer):
...
@@ -37,10 +37,10 @@ class ConvBnRelu(nn.Layer):
return
x
return
x
class
ConvB
n
(
nn
.
Layer
):
class
ConvB
N
(
nn
.
Layer
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
super
(
ConvB
n
,
self
).
__init__
()
super
(
ConvB
N
,
self
).
__init__
()
self
.
conv
=
Conv2d
(
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
)
self
.
conv
=
Conv2d
(
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
)
...
@@ -70,16 +70,16 @@ class ConvReluPool(nn.Layer):
...
@@ -70,16 +70,16 @@ class ConvReluPool(nn.Layer):
return
x
return
x
class
DepthwiseConvB
n
Relu
(
nn
.
Layer
):
class
DepthwiseConvB
N
Relu
(
nn
.
Layer
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
def
__init__
(
self
,
in_channels
,
out_channels
,
kernel_size
,
**
kwargs
):
super
(
DepthwiseConvB
n
Relu
,
self
).
__init__
()
super
(
DepthwiseConvB
N
Relu
,
self
).
__init__
()
self
.
depthwise_conv
=
ConvB
n
(
self
.
depthwise_conv
=
ConvB
N
(
in_channels
,
in_channels
,
out_channels
=
in_channels
,
out_channels
=
in_channels
,
kernel_size
=
kernel_size
,
kernel_size
=
kernel_size
,
groups
=
in_channels
,
groups
=
in_channels
,
**
kwargs
)
**
kwargs
)
self
.
piontwise_conv
=
ConvB
n
Relu
(
self
.
piontwise_conv
=
ConvB
N
Relu
(
in_channels
,
out_channels
,
kernel_size
=
1
,
groups
=
1
)
in_channels
,
out_channels
,
kernel_size
=
1
,
groups
=
1
)
def
forward
(
self
,
x
):
def
forward
(
self
,
x
):
...
@@ -109,7 +109,7 @@ class AuxLayer(nn.Layer):
...
@@ -109,7 +109,7 @@ class AuxLayer(nn.Layer):
dropout_prob
=
0.1
):
dropout_prob
=
0.1
):
super
(
AuxLayer
,
self
).
__init__
()
super
(
AuxLayer
,
self
).
__init__
()
self
.
conv_bn_relu
=
ConvB
n
Relu
(
self
.
conv_bn_relu
=
ConvB
N
Relu
(
in_channels
=
in_channels
,
in_channels
=
in_channels
,
out_channels
=
inter_channels
,
out_channels
=
inter_channels
,
kernel_size
=
3
,
kernel_size
=
3
,
...
@@ -127,4 +127,3 @@ class AuxLayer(nn.Layer):
...
@@ -127,4 +127,3 @@ class AuxLayer(nn.Layer):
x
=
F
.
dropout
(
x
,
p
=
self
.
dropout_prob
)
x
=
F
.
dropout
(
x
,
p
=
self
.
dropout_prob
)
x
=
self
.
conv
(
x
)
x
=
self
.
conv
(
x
)
return
x
return
x
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录