Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
1c56e0dc
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1c56e0dc
编写于
9月 27, 2016
作者:
H
Haonan
提交者:
emailweixu
9月 27, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed the name issue for conv_operator and added a test case (#131)
上级
942d2b62
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
4 deletion
+13
-4
python/paddle/trainer_config_helpers/layers.py
python/paddle/trainer_config_helpers/layers.py
+3
-3
python/paddle/trainer_config_helpers/tests/layers_test_config.py
...paddle/trainer_config_helpers/tests/layers_test_config.py
+10
-1
未找到文件。
python/paddle/trainer_config_helpers/layers.py
浏览文件 @
1c56e0dc
...
@@ -2704,8 +2704,8 @@ def conv_operator(img, filter, filter_size, num_filters,
...
@@ -2704,8 +2704,8 @@ def conv_operator(img, filter, filter_size, num_filters,
PaddlePaddle now supports rectangular filters,
PaddlePaddle now supports rectangular filters,
the filter's shape can be (filter_size, filter_size_y).
the filter's shape can be (filter_size, filter_size_y).
:type filter_size_y: int
:type filter_size_y: int
:param num_filter: channel of output data.
:param num_filter
s
: channel of output data.
:type num_filter: int
:type num_filter
s
: int
:param num_channel: channel of input data.
:param num_channel: channel of input data.
:type num_channel: int
:type num_channel: int
:param stride: The x dimension of the stride.
:param stride: The x dimension of the stride.
...
@@ -2726,7 +2726,7 @@ def conv_operator(img, filter, filter_size, num_filters,
...
@@ -2726,7 +2726,7 @@ def conv_operator(img, filter, filter_size, num_filters,
if
padding_y
is
None
:
if
padding_y
is
None
:
padding_y
=
padding
padding_y
=
padding
op
=
ConvOperator
(
input_layer_names
=
[
img
.
name
,
filter
.
name
],
op
=
ConvOperator
(
input_layer_names
=
[
img
.
name
,
filter
.
name
],
num_filters
=
num_filter
,
num_filters
=
num_filter
s
,
conv_conf
=
Conv
(
filter_size
=
filter_size
,
conv_conf
=
Conv
(
filter_size
=
filter_size
,
padding
=
padding
,
padding
=
padding
,
stride
=
stride
,
stride
=
stride
,
...
...
python/paddle/trainer_config_helpers/tests/layers_test_config.py
浏览文件 @
1c56e0dc
...
@@ -23,6 +23,15 @@ z = out_prod_layer(input1=x, input2=y)
...
@@ -23,6 +23,15 @@ z = out_prod_layer(input1=x, input2=y)
x1
=
fc_layer
(
input
=
x
,
size
=
5
)
x1
=
fc_layer
(
input
=
x
,
size
=
5
)
y1
=
fc_layer
(
input
=
y
,
size
=
5
)
y1
=
fc_layer
(
input
=
y
,
size
=
5
)
z1
=
mixed_layer
(
act
=
LinearActivation
(),
input
=
[
conv_operator
(
img
=
x1
,
filter
=
y1
,
filter_size
=
1
,
num_filters
=
5
,
num_channel
=
5
,
stride
=
1
)])
y2
=
fc_layer
(
input
=
y
,
size
=
15
)
y2
=
fc_layer
(
input
=
y
,
size
=
15
)
cos1
=
cos_sim
(
a
=
x1
,
b
=
y1
)
cos1
=
cos_sim
(
a
=
x1
,
b
=
y1
)
...
@@ -30,7 +39,7 @@ cos3 = cos_sim(a=x1, b=y2, size=3)
...
@@ -30,7 +39,7 @@ cos3 = cos_sim(a=x1, b=y2, size=3)
linear_comb
=
linear_comb_layer
(
weights
=
x1
,
vectors
=
y2
,
size
=
3
)
linear_comb
=
linear_comb_layer
(
weights
=
x1
,
vectors
=
y2
,
size
=
3
)
out
=
fc_layer
(
input
=
[
cos1
,
cos3
,
linear_comb
,
z
],
out
=
fc_layer
(
input
=
[
cos1
,
cos3
,
linear_comb
,
z
,
z1
],
size
=
num_classes
,
size
=
num_classes
,
act
=
SoftmaxActivation
())
act
=
SoftmaxActivation
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录