Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
5ef7c97e
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
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看板
提交
5ef7c97e
编写于
12月 19, 2016
作者:
H
hedaoyuan
提交者:
GitHub
12月 19, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #940 from reyoung/feature/fix_rnn_unittests
Fix RNN unittest bugs.
上级
10fe3088
a980b83a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
6 addition
and
18 deletion
+6
-18
paddle/gserver/dataproviders/PyDataProvider2.cpp
paddle/gserver/dataproviders/PyDataProvider2.cpp
+3
-15
paddle/gserver/tests/test_RecurrentGradientMachine.cpp
paddle/gserver/tests/test_RecurrentGradientMachine.cpp
+3
-3
未找到文件。
paddle/gserver/dataproviders/PyDataProvider2.cpp
浏览文件 @
5ef7c97e
...
@@ -252,19 +252,9 @@ private:
...
@@ -252,19 +252,9 @@ private:
// only for instance will make python reference-count error.
// only for instance will make python reference-count error.
//
//
// So here, we increase reference count manually.
// So here, we increase reference count manually.
if
(
gModuleClsPtrs_
.
find
((
uintptr_t
)
module
.
get
())
!=
gModuleClsPtrs_
.
end
())
{
// Multi instance use same module
Py_XINCREF
(
module
.
get
());
Py_XINCREF
(
module
.
get
());
Py_XINCREF
(
moduleDict
.
get
());
Py_XINCREF
(
moduleDict
.
get
());
}
else
{
gModuleClsPtrs_
.
insert
((
uintptr_t
)
module
.
get
());
}
if
(
gModuleClsPtrs_
.
find
((
uintptr_t
)
cls
.
get
())
!=
gModuleClsPtrs_
.
end
())
{
Py_XINCREF
(
cls
.
get
());
Py_XINCREF
(
cls
.
get
());
}
else
{
gModuleClsPtrs_
.
insert
((
uintptr_t
)
cls
.
get
());
}
PyObjectPtr
fileListInPy
=
loadPyFileLists
(
fileListName
);
PyObjectPtr
fileListInPy
=
loadPyFileLists
(
fileListName
);
PyDict_SetItemString
(
kwargs
.
get
(),
"file_list"
,
fileListInPy
.
get
());
PyDict_SetItemString
(
kwargs
.
get
(),
"file_list"
,
fileListInPy
.
get
());
...
@@ -471,7 +461,6 @@ private:
...
@@ -471,7 +461,6 @@ private:
std
::
vector
<
std
::
string
>
fileLists_
;
std
::
vector
<
std
::
string
>
fileLists_
;
std
::
vector
<
SlotHeader
>
headers_
;
std
::
vector
<
SlotHeader
>
headers_
;
static
PyObjectPtr
zeroTuple_
;
static
PyObjectPtr
zeroTuple_
;
static
std
::
unordered_set
<
uintptr_t
>
gModuleClsPtrs_
;
class
PositionRandom
{
class
PositionRandom
{
public:
public:
...
@@ -671,7 +660,6 @@ public:
...
@@ -671,7 +660,6 @@ public:
}
}
};
};
std
::
unordered_set
<
uintptr_t
>
PyDataProvider2
::
gModuleClsPtrs_
;
PyObjectPtr
PyDataProvider2
::
zeroTuple_
(
PyTuple_New
(
0
));
PyObjectPtr
PyDataProvider2
::
zeroTuple_
(
PyTuple_New
(
0
));
REGISTER_DATA_PROVIDER_EX
(
py2
,
PyDataProvider2
);
REGISTER_DATA_PROVIDER_EX
(
py2
,
PyDataProvider2
);
...
...
paddle/gserver/tests/test_RecurrentGradientMachine.cpp
浏览文件 @
5ef7c97e
...
@@ -127,7 +127,7 @@ TEST(RecurrentGradientMachine, HasSubSequence) {
...
@@ -127,7 +127,7 @@ TEST(RecurrentGradientMachine, HasSubSequence) {
}
}
}
}
TEST
(
RecurrentGradientMachine
,
DISABLED_
rnn
)
{
TEST
(
RecurrentGradientMachine
,
rnn
)
{
for
(
bool
useGpu
:
{
false
,
true
})
{
for
(
bool
useGpu
:
{
false
,
true
})
{
test
(
"gserver/tests/sequence_rnn.conf"
,
test
(
"gserver/tests/sequence_rnn.conf"
,
"gserver/tests/sequence_nest_rnn.conf"
,
"gserver/tests/sequence_nest_rnn.conf"
,
...
@@ -136,7 +136,7 @@ TEST(RecurrentGradientMachine, DISABLED_rnn) {
...
@@ -136,7 +136,7 @@ TEST(RecurrentGradientMachine, DISABLED_rnn) {
}
}
}
}
TEST
(
RecurrentGradientMachine
,
DISABLED_
rnn_multi_input
)
{
TEST
(
RecurrentGradientMachine
,
rnn_multi_input
)
{
for
(
bool
useGpu
:
{
false
,
true
})
{
for
(
bool
useGpu
:
{
false
,
true
})
{
test
(
"gserver/tests/sequence_rnn_multi_input.conf"
,
test
(
"gserver/tests/sequence_rnn_multi_input.conf"
,
"gserver/tests/sequence_nest_rnn_multi_input.conf"
,
"gserver/tests/sequence_nest_rnn_multi_input.conf"
,
...
@@ -145,7 +145,7 @@ TEST(RecurrentGradientMachine, DISABLED_rnn_multi_input) {
...
@@ -145,7 +145,7 @@ TEST(RecurrentGradientMachine, DISABLED_rnn_multi_input) {
}
}
}
}
TEST
(
RecurrentGradientMachine
,
DISABLED_
rnn_multi_unequalength_input
)
{
TEST
(
RecurrentGradientMachine
,
rnn_multi_unequalength_input
)
{
for
(
bool
useGpu
:
{
false
,
true
})
{
for
(
bool
useGpu
:
{
false
,
true
})
{
test
(
"gserver/tests/sequence_rnn_multi_unequalength_inputs.py"
,
test
(
"gserver/tests/sequence_rnn_multi_unequalength_inputs.py"
,
"gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py"
,
"gserver/tests/sequence_nest_rnn_multi_unequalength_inputs.py"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录