Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
c31aed4d
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c31aed4d
编写于
5月 11, 2017
作者:
Q
qingqing01
提交者:
GitHub
5月 11, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2102 from qingqing01/config_parse
Remove g_pass_height_width in config_parse.py
上级
ab5ad221
af9816b2
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
1 addition
and
22 deletion
+1
-22
python/paddle/trainer/config_parser.py
python/paddle/trainer/config_parser.py
+1
-16
python/paddle/trainer_config_helpers/tests/configs/protostr/test_bilinear_interp.protostr
...pers/tests/configs/protostr/test_bilinear_interp.protostr
+0
-2
python/paddle/trainer_config_helpers/tests/configs/protostr/test_maxout.protostr
...onfig_helpers/tests/configs/protostr/test_maxout.protostr
+0
-4
未找到文件。
python/paddle/trainer/config_parser.py
浏览文件 @
c31aed4d
...
...
@@ -138,14 +138,7 @@ def init_config_environment(
g_root_submodel
=
None
,
g_submodel_map
=
{},
g_submodel_stack
=
[],
g_add_submodel_suffix
=
False
,
# Whether current layer needs to pass the image height and width.
# Default value is true, but if it encounters recurrent_layer_group,
# it will be false. The reason is that image is converted to be sequence,
# image height will be sequence length, and image width will be feature
# length of each timestep.
g_pass_height_width
=
True
,
):
g_add_submodel_suffix
=
False
,
):
for
k
,
v
in
locals
().
iteritems
():
globals
()[
k
]
=
copy
.
deepcopy
(
v
)
...
...
@@ -1437,12 +1430,6 @@ class LayerBase(object):
g_current_submodel
.
layer_names
.
append
(
self
.
config
.
name
)
if
self
.
config
.
type
!=
'data'
and
g_pass_height_width
:
height
=
self
.
get_input_layer
(
0
).
height
width
=
self
.
get_input_layer
(
0
).
width
if
height
and
width
:
self
.
set_layer_height_width
(
height
,
width
)
def
get_input_layer
(
self
,
input_index
):
return
g_layer_map
[
self
.
config
.
inputs
[
input_index
].
input_layer_name
]
...
...
@@ -3164,8 +3151,6 @@ class WarpCTCLayer(LayerBase):
@
config_layer
(
'recurrent_layer_group'
)
class
RecurrentLayerGroup
(
LayerBase
):
def
__init__
(
self
,
name
,
device
=
None
):
global
g_pass_height_width
g_pass_height_width
=
False
super
(
RecurrentLayerGroup
,
self
).
__init__
(
name
,
'recurrent_layer_group'
,
0
,
inputs
=
[],
device
=
device
)
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_bilinear_interp.protostr
浏览文件 @
c31aed4d
...
...
@@ -90,8 +90,6 @@ layers {
input_layer_name: "__pool_0__"
input_parameter_name: "___fc_layer_0__.w0"
}
height: 32
width: 32
}
parameters {
name: "___conv_0__.w0"
...
...
python/paddle/trainer_config_helpers/tests/configs/protostr/test_maxout.protostr
浏览文件 @
c31aed4d
...
...
@@ -153,8 +153,6 @@ layers {
img_size_y: 0
}
}
height: 24
width: 24
}
layers {
name: "__fc_layer_0__"
...
...
@@ -165,8 +163,6 @@ layers {
input_layer_name: "__block_expand_layer_0__"
input_parameter_name: "___fc_layer_0__.w0"
}
height: 24
width: 24
}
parameters {
name: "___conv_0__.w0"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录