Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
33032b12
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
33032b12
编写于
11月 01, 2017
作者:
X
xzl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug: regenrate test proto of img_conv
上级
300b5094
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
26 addition
and
8 deletion
+26
-8
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+11
-7
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+3
-1
python/paddle/trainer_config_helpers/tests/configs/protostr/img_layers.protostr
...config_helpers/tests/configs/protostr/img_layers.protostr
+2
-0
python/paddle/trainer_config_helpers/tests/configs/protostr/img_trans_layers.protostr
..._helpers/tests/configs/protostr/img_trans_layers.protostr
+2
-0
python/paddle/trainer_config_helpers/tests/configs/protostr/test_bilinear_interp.protostr
...pers/tests/configs/protostr/test_bilinear_interp.protostr
+2
-0
python/paddle/trainer_config_helpers/tests/configs/protostr/test_maxout.protostr
...onfig_helpers/tests/configs/protostr/test_maxout.protostr
+4
-0
python/paddle/trainer_config_helpers/tests/configs/protostr/test_pad.protostr
...r_config_helpers/tests/configs/protostr/test_pad.protostr
+2
-0
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
33032b12
...
@@ -874,7 +874,7 @@ class Conv(Cfg):
...
@@ -874,7 +874,7 @@ class Conv(Cfg):
filter_size_y
=
None
,
filter_size_y
=
None
,
padding_y
=
None
,
padding_y
=
None
,
stride_y
=
None
,
stride_y
=
None
,
dilation
=
1
,
dilation
=
None
,
dilation_y
=
None
):
dilation_y
=
None
):
self
.
add_keys
(
locals
())
self
.
add_keys
(
locals
())
if
filter_size_y
is
None
:
if
filter_size_y
is
None
:
...
@@ -1388,8 +1388,12 @@ def parse_conv(conv, input_layer_name, conv_conf, num_filters, trans=False):
...
@@ -1388,8 +1388,12 @@ def parse_conv(conv, input_layer_name, conv_conf, num_filters, trans=False):
conv_conf
.
stride_y
=
conv
.
stride_y
conv_conf
.
stride_y
=
conv
.
stride_y
conv_conf
.
groups
=
conv
.
groups
conv_conf
.
groups
=
conv
.
groups
conv_conf
.
caffe_mode
=
conv
.
caffe_mode
conv_conf
.
caffe_mode
=
conv
.
caffe_mode
conv_conf
.
dilation
=
conv
.
dilation
if
not
conv
.
dilation
:
conv_conf
.
dilation_y
=
conv
.
dilation_y
conv
.
dilation
=
1
conv
.
dilation_y
=
1
else
:
conv_conf
.
dilation
=
conv
.
dilation
conv_conf
.
dilation_y
=
conv
.
dilation_y
if
not
trans
:
if
not
trans
:
conv_conf
.
filter_channels
=
conv
.
channels
/
conv
.
groups
conv_conf
.
filter_channels
=
conv
.
channels
/
conv
.
groups
...
@@ -1397,20 +1401,20 @@ def parse_conv(conv, input_layer_name, conv_conf, num_filters, trans=False):
...
@@ -1397,20 +1401,20 @@ def parse_conv(conv, input_layer_name, conv_conf, num_filters, trans=False):
get_img_size
(
input_layer_name
,
conv
.
channels
)
get_img_size
(
input_layer_name
,
conv
.
channels
)
conv_conf
.
output_x
=
cnn_output_size
(
conv_conf
.
output_x
=
cnn_output_size
(
conv_conf
.
img_size
,
conv_conf
.
filter_size
,
conv_conf
.
padding
,
conv_conf
.
img_size
,
conv_conf
.
filter_size
,
conv_conf
.
padding
,
conv_conf
.
stride
,
conv_conf
.
caffe_mode
,
conv
_conf
.
dilation
)
conv_conf
.
stride
,
conv_conf
.
caffe_mode
,
conv
.
dilation
)
conv_conf
.
output_y
=
cnn_output_size
(
conv_conf
.
output_y
=
cnn_output_size
(
conv_conf
.
img_size_y
,
conv_conf
.
filter_size_y
,
conv_conf
.
padding_y
,
conv_conf
.
img_size_y
,
conv_conf
.
filter_size_y
,
conv_conf
.
padding_y
,
conv_conf
.
stride_y
,
conv_conf
.
caffe_mode
,
conv
_conf
.
dilation_y
)
conv_conf
.
stride_y
,
conv_conf
.
caffe_mode
,
conv
.
dilation_y
)
else
:
else
:
conv_conf
.
filter_channels
=
num_filters
/
conv
.
groups
conv_conf
.
filter_channels
=
num_filters
/
conv
.
groups
conv_conf
.
output_x
,
conv_conf
.
output_y
=
\
conv_conf
.
output_x
,
conv_conf
.
output_y
=
\
get_img_size
(
input_layer_name
,
conv
.
channels
)
get_img_size
(
input_layer_name
,
conv
.
channels
)
conv_conf
.
img_size
=
cnn_image_size
(
conv_conf
.
img_size
=
cnn_image_size
(
conv_conf
.
output_x
,
conv_conf
.
filter_size
,
conv_conf
.
padding
,
conv_conf
.
output_x
,
conv_conf
.
filter_size
,
conv_conf
.
padding
,
conv_conf
.
stride
,
conv_conf
.
caffe_mode
,
conv
_conf
.
dilation
)
conv_conf
.
stride
,
conv_conf
.
caffe_mode
,
conv
.
dilation
)
conv_conf
.
img_size_y
=
cnn_image_size
(
conv_conf
.
img_size_y
=
cnn_image_size
(
conv_conf
.
output_y
,
conv_conf
.
filter_size_y
,
conv_conf
.
padding_y
,
conv_conf
.
output_y
,
conv_conf
.
filter_size_y
,
conv_conf
.
padding_y
,
conv_conf
.
stride_y
,
conv_conf
.
caffe_mode
,
conv
_conf
.
dilation_y
)
conv_conf
.
stride_y
,
conv_conf
.
caffe_mode
,
conv
.
dilation_y
)
#caffe_mode: compute the output size using floor instead of ceil,
#caffe_mode: compute the output size using floor instead of ceil,
...
...
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
33032b12
...
@@ -2523,7 +2523,9 @@ def img_conv_layer(input,
...
@@ -2523,7 +2523,9 @@ def img_conv_layer(input,
if
layer_type
:
if
layer_type
:
if
dilation
>
1
or
dilation_y
>
1
:
if
dilation
>
1
or
dilation_y
>
1
:
assert
layer_type
in
[
"cudnn_conv"
,
"cudnn_convt"
]
assert
layer_type
in
[
"cudnn_conv"
,
"cudnn_convt"
,
"exconv"
,
"exconvt"
]
if
trans
:
if
trans
:
assert
layer_type
in
[
"exconvt"
,
"cudnn_convt"
]
assert
layer_type
in
[
"exconvt"
,
"cudnn_convt"
]
else
:
else
:
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/img_layers.protostr
浏览文件 @
33032b12
...
@@ -28,6 +28,8 @@ layers {
...
@@ -28,6 +28,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 227
output_y: 227
img_size_y: 256
img_size_y: 256
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_0__.wbias"
bias_parameter_name: "___conv_0__.wbias"
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/img_trans_layers.protostr
浏览文件 @
33032b12
...
@@ -28,6 +28,8 @@ layers {
...
@@ -28,6 +28,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 227
output_y: 227
img_size_y: 256
img_size_y: 256
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_0__.wbias"
bias_parameter_name: "___conv_0__.wbias"
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_bilinear_interp.protostr
浏览文件 @
33032b12
...
@@ -28,6 +28,8 @@ layers {
...
@@ -28,6 +28,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 48
output_y: 48
img_size_y: 48
img_size_y: 48
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_0__.wbias"
bias_parameter_name: "___conv_0__.wbias"
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_maxout.protostr
浏览文件 @
33032b12
...
@@ -30,6 +30,8 @@ layers {
...
@@ -30,6 +30,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 48
output_y: 48
img_size_y: 48
img_size_y: 48
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_0__.wbias"
bias_parameter_name: "___conv_0__.wbias"
...
@@ -105,6 +107,8 @@ layers {
...
@@ -105,6 +107,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 24
output_y: 24
img_size_y: 24
img_size_y: 24
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_1__.wbias"
bias_parameter_name: "___conv_1__.wbias"
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_pad.protostr
浏览文件 @
33032b12
...
@@ -30,6 +30,8 @@ layers {
...
@@ -30,6 +30,8 @@ layers {
stride_y: 1
stride_y: 1
output_y: 48
output_y: 48
img_size_y: 48
img_size_y: 48
dilation: 1
dilation_y: 1
}
}
}
}
bias_parameter_name: "___conv_0__.wbias"
bias_parameter_name: "___conv_0__.wbias"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录