Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wk1234123
Paddle
提交
98bc889c
P
Paddle
项目概览
wk1234123
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
4
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
98bc889c
编写于
9月 21, 2016
作者:
H
Haonan
提交者:
emailweixu
9月 21, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
split the input list of conv_operator into two inputs: image and filter (#104)
上级
b130ba73
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
7 deletion
+9
-7
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+9
-7
未找到文件。
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
98bc889c
...
...
@@ -2667,7 +2667,7 @@ def classification_cost(input, label, name=None,
return
LayerOutput
(
name
,
LayerType
.
COST
,
parents
=
[
input
,
label
])
def
conv_operator
(
i
nput
,
filter_size
,
num_filters
,
def
conv_operator
(
i
mg
,
filter
,
filter_size
,
num_filters
,
num_channel
=
None
,
stride
=
1
,
padding
=
0
,
groups
=
1
,
filter_size_y
=
None
,
stride_y
=
None
,
padding_y
=
None
):
"""
...
...
@@ -2680,13 +2680,16 @@ def conv_operator(input, filter_size, num_filters,
.. code-block:: python
op = conv_operator(input=[layer1, layer2],
op = conv_operator(img=input1,
filter=input2,
filter_size=3.0,
num_filters=64,
num_channels=64)
:param input: Input layer.
:type input: LayerOutput|list|tuple
:param img: input image
:type img: LayerOutput
:param filter: input filter
:type filter: LayerOutput
:param filter_size: The x dimension of a filter kernel.
:type filter_size: int
:param filter_size_y: The y dimension of a filter kernel. Since
...
...
@@ -2708,14 +2711,13 @@ def conv_operator(input, filter_size, num_filters,
:return: A ConvOperator Object.
:rtype: ConvOperator
"""
assert
isinstance
(
input
,
list
)
or
isinstance
(
input
,
tuple
)
if
filter_size_y
is
None
:
filter_size_y
=
filter_size
if
stride_y
is
None
:
stride_y
=
stride
if
padding_y
is
None
:
padding_y
=
padding
op
=
ConvOperator
(
input_layer_names
=
[
x
.
name
for
x
in
input
],
op
=
ConvOperator
(
input_layer_names
=
[
img
.
name
,
filter
.
name
],
num_filters
=
num_filter
,
conv_conf
=
Conv
(
filter_size
=
filter_size
,
padding
=
padding
,
...
...
@@ -2725,7 +2727,7 @@ def conv_operator(input, filter_size, num_filters,
padding_y
=
padding_y
,
stride_y
=
stride_y
,
groups
=
groups
))
op
.
origin
=
input
op
.
origin
=
[
img
,
filter
]
op
.
origin
.
operator
=
"conv_op"
return
op
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录