Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
74f76e61
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
74f76e61
编写于
1月 09, 2017
作者:
D
dangqingqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update code and fix bug
上级
6db642ff
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
12 deletion
+10
-12
paddle/function/PadOp.cpp
paddle/function/PadOp.cpp
+6
-6
paddle/function/PadOpTest.cpp
paddle/function/PadOpTest.cpp
+1
-1
paddle/gserver/tests/test_LayerGrad.cpp
paddle/gserver/tests/test_LayerGrad.cpp
+3
-5
未找到文件。
paddle/function/PadOp.cpp
浏览文件 @
74f76e61
...
@@ -92,9 +92,9 @@ public:
...
@@ -92,9 +92,9 @@ public:
void
calc
(
const
Arguments
&
inputs
,
void
calc
(
const
Arguments
&
inputs
,
const
Arguments
&
outputs
,
const
Arguments
&
outputs
,
const
Arguments
&
inouts
)
override
{
const
Arguments
&
inouts
)
override
{
CHECK_EQ
(
1
,
inputs
.
size
());
CHECK_EQ
(
1
UL
,
inputs
.
size
());
CHECK_EQ
(
1
,
outputs
.
size
());
CHECK_EQ
(
1
UL
,
outputs
.
size
());
CHECK_EQ
(
0
,
inouts
.
size
());
CHECK_EQ
(
0
UL
,
inouts
.
size
());
size_t
num
=
inputs
[
0
].
dims_
[
0
];
size_t
num
=
inputs
[
0
].
dims_
[
0
];
size_t
inC
=
inputs
[
0
].
dims_
[
1
];
size_t
inC
=
inputs
[
0
].
dims_
[
1
];
...
@@ -143,9 +143,9 @@ public:
...
@@ -143,9 +143,9 @@ public:
void
calc
(
const
Arguments
&
inputs
,
void
calc
(
const
Arguments
&
inputs
,
const
Arguments
&
outputs
,
const
Arguments
&
outputs
,
const
Arguments
&
inouts
)
override
{
const
Arguments
&
inouts
)
override
{
CHECK_EQ
(
1
,
inputs
.
size
());
CHECK_EQ
(
1
UL
,
inputs
.
size
());
CHECK_EQ
(
0
,
outputs
.
size
());
CHECK_EQ
(
0
UL
,
outputs
.
size
());
CHECK_EQ
(
1
,
inouts
.
size
());
CHECK_EQ
(
1
UL
,
inouts
.
size
());
size_t
n
=
inouts
[
0
].
dims_
[
0
];
size_t
n
=
inouts
[
0
].
dims_
[
0
];
size_t
inC
=
inouts
[
0
].
dims_
[
1
];
size_t
inC
=
inouts
[
0
].
dims_
[
1
];
...
...
paddle/function/PadOpTest.cpp
浏览文件 @
74f76e61
...
@@ -62,7 +62,7 @@ TEST(PadGrad, real) {
...
@@ -62,7 +62,7 @@ TEST(PadGrad, real) {
Dims
inDims
{
numSamples
,
channels
,
imgSizeH
,
imgSizeW
};
Dims
inDims
{
numSamples
,
channels
,
imgSizeH
,
imgSizeW
};
Dims
outDims
{
numSamples
,
channels
+
5
,
imgSizeH
+
3
,
imgSizeW
+
5
};
Dims
outDims
{
numSamples
,
channels
+
5
,
imgSizeH
+
3
,
imgSizeW
+
5
};
compare
.
cmpWithArg
(
compare
.
cmpWithArg
(
{
Tensor
(
nullptr
,
inDims
)},
{},
{
Tensor
(
nullptr
,
out
Dims
)});
{
Tensor
(
nullptr
,
outDims
)},
{},
{
Tensor
(
nullptr
,
in
Dims
)});
}
}
}
}
}
}
...
...
paddle/gserver/tests/test_LayerGrad.cpp
浏览文件 @
74f76e61
...
@@ -850,15 +850,13 @@ TEST(Layer, SequenceLastInstanceLayer) {
...
@@ -850,15 +850,13 @@ TEST(Layer, SequenceLastInstanceLayer) {
testDegradeLayer
(
true
,
testDegradeLayer
(
true
,
"seqlastins"
,
"seqlastins"
,
"non-seq"
);
// hasSubseq seqlastins to non-seq
"non-seq"
);
// hasSubseq seqlastins to non-seq
testDegradeLayer
(
true
,
"seqlastins"
,
"seq"
);
// hasSubseq seqlastins to
testDegradeLayer
(
true
,
"seqlastins"
,
"seq"
);
// hasSubseq seqlastins to seq
seq
}
}
TEST
(
Layer
,
AverageLayer
)
{
TEST
(
Layer
,
AverageLayer
)
{
testDegradeLayer
(
false
,
"average"
,
"non-seq"
);
// seq average to non-seq
testDegradeLayer
(
false
,
"average"
,
"non-seq"
);
// seq average to non-seq
testDegradeLayer
(
true
,
"average"
,
"non-seq"
);
// hasSubseq average to
testDegradeLayer
(
true
,
"average"
,
"non-seq"
);
// hasSubseq average to non-seq
non
-
testDegradeLayer
(
true
,
"average"
,
"seq"
);
// hasSubseq average to seq
seq
testDegradeLayer
(
true
,
"average"
,
"seq"
);
// hasSubseq average to seq
}
}
TEST
(
Layer
,
SequenceConcatLayer
)
{
TEST
(
Layer
,
SequenceConcatLayer
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录