Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
8bd47522
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看板
提交
8bd47522
编写于
12月 21, 2016
作者:
P
Peng Li
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into add_label_seq_pos_to_inputdef
上级
1b8e151f
446e3c21
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
33 addition
and
46 deletion
+33
-46
.travis.yml
.travis.yml
+1
-1
paddle/gserver/tests/test_ConvTrans.cpp
paddle/gserver/tests/test_ConvTrans.cpp
+6
-6
paddle/gserver/tests/test_ConvUnify.cpp
paddle/gserver/tests/test_ConvUnify.cpp
+6
-23
paddle/parameter/ParameterUpdaterBase.h
paddle/parameter/ParameterUpdaterBase.h
+3
-3
paddle/scripts/travis/docs.sh
paddle/scripts/travis/docs.sh
+6
-2
paddle/trainer/ParameterUpdater.h
paddle/trainer/ParameterUpdater.h
+4
-4
paddle/trainer/RemoteParameterUpdater.cpp
paddle/trainer/RemoteParameterUpdater.cpp
+2
-2
paddle/trainer/RemoteParameterUpdater.h
paddle/trainer/RemoteParameterUpdater.h
+2
-2
paddle/trainer/ThreadParameterUpdater.cpp
paddle/trainer/ThreadParameterUpdater.cpp
+1
-1
paddle/trainer/ThreadParameterUpdater.h
paddle/trainer/ThreadParameterUpdater.h
+1
-1
paddle/trainer/Trainer.cpp
paddle/trainer/Trainer.cpp
+1
-1
未找到文件。
.travis.yml
浏览文件 @
8bd47522
...
...
@@ -56,7 +56,7 @@ before_install:
-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo paddle/scripts/travis/before_install.linux.sh; fi
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then paddle/scripts/travis/before_install.osx.sh; fi
-
if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
-
pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit
-
pip install wheel protobuf sphinx recommonmark virtualenv numpy sphinx_rtd_theme pre-commit
requests==2.9.2 LinkChecker
script
:
-
paddle/scripts/travis/main.sh
notifications
:
...
...
paddle/gserver/tests/test_ConvTrans.cpp
浏览文件 @
8bd47522
...
...
@@ -206,8 +206,8 @@ TEST(Layer, convTransLayerFwd2) {
/* filter_size */
5
,
result
);
float
resultData
[]
=
{
1
,
2
,
2
,
2
,
1
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
1
,
2
,
2
,
2
,
1
};
real
resultData
[]
=
{
1
,
2
,
2
,
2
,
1
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
1
,
2
,
2
,
2
,
1
};
result
->
setData
(
resultData
);
doOneConvtTest
(
/* imgSize */
5
,
/* output_x */
2
,
...
...
@@ -216,8 +216,8 @@ TEST(Layer, convTransLayerFwd2) {
/* filter_size */
4
,
result
);
float
resultData2
[]
=
{
1
,
2
,
2
,
2
,
1
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
1
,
2
,
2
,
2
,
1
};
real
resultData2
[]
=
{
1
,
2
,
2
,
2
,
1
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
2
,
4
,
4
,
4
,
2
,
1
,
2
,
2
,
2
,
1
};
result
->
setData
(
resultData2
);
doOneConvtTest
(
/* imgSize */
5
,
/* output_x */
2
,
...
...
@@ -226,8 +226,8 @@ TEST(Layer, convTransLayerFwd2) {
/* filter_size */
5
,
result
);
float
resultData3
[]
=
{
1
,
1
,
2
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
2
,
2
,
4
,
2
,
2
,
1
,
1
,
2
,
1
,
1
,
1
,
1
,
2
,
1
,
1
};
real
resultData3
[]
=
{
1
,
1
,
2
,
1
,
1
,
1
,
1
,
2
,
1
,
1
,
2
,
2
,
4
,
2
,
2
,
1
,
1
,
2
,
1
,
1
,
1
,
1
,
2
,
1
,
1
};
result
->
setData
(
resultData3
);
doOneConvtTest
(
/* imgSize */
5
,
/* output_x */
2
,
...
...
paddle/gserver/tests/test_ConvUnify.cpp
浏览文件 @
8bd47522
...
...
@@ -106,8 +106,8 @@ TEST(Layer, convParaUnified) {
#ifndef PADDLE_ONLY_CPU
MatrixPtr
input
,
resultCpu
,
resultGpu
;
input
=
Matrix
::
create
(
1
,
4
*
4
,
false
,
false
);
float
inputData
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
};
float
param
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
};
real
inputData
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
};
real
param
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
9
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
};
input
->
setData
(
inputData
);
...
...
@@ -137,26 +137,9 @@ TEST(Layer, convParaUnified) {
checkMatrixEqual
(
resultCpu
,
resultGpu
);
input
=
Matrix
::
create
(
1
,
3
*
3
*
2
,
false
,
false
);
float
inputData2
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
};
float
param2
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
};
real
inputData2
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
};
real
param2
[]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
8
,
7
,
6
,
5
,
4
,
3
,
2
,
1
};
input
->
setData
(
inputData2
);
...
...
@@ -185,7 +168,7 @@ TEST(Layer, convParaUnified) {
true
);
checkMatrixEqual
(
resultCpu
,
resultGpu
);
float
param3
[]
=
{
1
,
2
,
3
,
4
,
4
,
3
,
2
,
1
};
real
param3
[]
=
{
1
,
2
,
3
,
4
,
4
,
3
,
2
,
1
};
resultCpu
=
doOneConvTest
(
/* imgSize */
3
,
/* output_x */
2
,
...
...
paddle/parameter/ParameterUpdaterBase.h
浏览文件 @
8bd47522
...
...
@@ -38,7 +38,7 @@ public:
virtual
void
startPass
()
{}
// called by Trainer then finishing a pass, ruturn true if pass accepted
virtual
bool
finishPass
(
real
cost
=
0
)
{
return
true
;
}
virtual
bool
finishPass
()
{
return
true
;
}
// called by Trainer before backward() of a batch
// Return the type of pass it needs. This pass type will be passed
...
...
@@ -112,9 +112,9 @@ public:
[
&
](
int
tid
,
size_t
numThreads
)
{
updaters_
[
tid
]
->
startPass
();
});
}
virtual
bool
finishPass
(
real
cost
=
0
)
{
virtual
bool
finishPass
()
{
syncThreadPool_
->
execPlusOwner
(
[
&
](
int
tid
,
size_t
numThreads
)
{
updaters_
[
tid
]
->
finishPass
(
cost
);
});
[
&
](
int
tid
,
size_t
numThreads
)
{
updaters_
[
tid
]
->
finishPass
();
});
return
true
;
}
...
...
paddle/scripts/travis/docs.sh
浏览文件 @
8bd47522
...
...
@@ -7,6 +7,10 @@ source ./common.sh
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-DWITH_GPU
=
OFF
-DWITH_DOC
=
ON
make paddle_docs paddle_docs_cn
# check websites for broken links
linkchecker doc/en/html/index.html
linkchecker doc/cn/html/index.html
# Parse Github URL
REPO
=
`
git config remote.origin.url
`
SSH_REPO
=
${
REPO
/https
:
\/\/github.com\//git@github.com
:
}
...
...
@@ -35,8 +39,8 @@ git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
# remove old docs. mv new docs.
rm
-rf
doc doc_cn
mv
../doc
_
cn/html doc_cn
mv
../doc/html doc
mv
../doc
/
cn/html doc_cn
mv
../doc/
en/
html doc
# Check is there anything changed.
set
+e
...
...
paddle/trainer/ParameterUpdater.h
浏览文件 @
8bd47522
...
...
@@ -102,9 +102,9 @@ public:
* @param cost sum cost during one pass.
* @return true if accept (used for owlqn).
*/
virtual
bool
finishPass
(
real
cost
)
{
virtual
bool
finishPass
()
{
optimizer_
->
finishPass
();
return
ParameterUpdater
::
finishPass
(
cost
);
return
ParameterUpdater
::
finishPass
();
}
/**
...
...
@@ -220,9 +220,9 @@ public:
averager_
->
startPass
();
SgdLocalUpdater
::
startPass
();
}
virtual
bool
finishPass
(
real
cost
)
{
virtual
bool
finishPass
()
{
averager_
->
finishPass
();
return
SgdLocalUpdater
::
finishPass
(
cost
);
return
SgdLocalUpdater
::
finishPass
();
}
/// apply the averaged parameter to PARAMETER_VALUE
...
...
paddle/trainer/RemoteParameterUpdater.cpp
浏览文件 @
8bd47522
...
...
@@ -309,7 +309,7 @@ void RemoteParameterUpdater::startPass() {
}
}
bool
RemoteParameterUpdater
::
finishPass
(
real
cost
)
{
bool
RemoteParameterUpdater
::
finishPass
()
{
if
(
localUpdater_
)
{
localUpdater_
->
finishPass
();
}
...
...
@@ -712,7 +712,7 @@ void SparseRemoteParameterUpdater::startPass() {
}
}
bool
SparseRemoteParameterUpdater
::
finishPass
(
real
cost
)
{
bool
SparseRemoteParameterUpdater
::
finishPass
()
{
if
(
config_
.
algorithm
()
==
TrainAlgorithm
::
SGD
)
{
parameterClient_
->
waitPassFinish
();
}
else
{
...
...
paddle/trainer/RemoteParameterUpdater.h
浏览文件 @
8bd47522
...
...
@@ -90,7 +90,7 @@ public:
*/
virtual
void
finishBatch
(
real
cost
);
virtual
void
startPass
();
virtual
bool
finishPass
(
real
cost
);
virtual
bool
finishPass
();
#ifndef PADDLE_DISABLE_TIMER
virtual
void
setForwardbackwardTime
(
uint64_t
delta
)
{
...
...
@@ -281,7 +281,7 @@ public:
/// send all sparse related parameters to all pservers
virtual
void
finishBatch
(
real
cost
);
virtual
void
startPass
();
virtual
bool
finishPass
(
real
cost
);
virtual
bool
finishPass
();
virtual
void
apply
();
virtual
void
restore
();
...
...
paddle/trainer/ThreadParameterUpdater.cpp
浏览文件 @
8bd47522
...
...
@@ -70,7 +70,7 @@ void SgdThreadUpdater::startPass() {
}
}
bool
SgdThreadUpdater
::
finishPass
(
real
cost
)
{
bool
SgdThreadUpdater
::
finishPass
()
{
catchUpWith
();
for
(
auto
&
para
:
parameters_
)
{
...
...
paddle/trainer/ThreadParameterUpdater.h
浏览文件 @
8bd47522
...
...
@@ -47,7 +47,7 @@ public:
virtual
void
startPass
();
// Use the finishPass() function of the base optimizer.
virtual
bool
finishPass
(
real
cost
);
virtual
bool
finishPass
();
virtual
void
init
(
const
std
::
vector
<
ParameterPtr
>&
parameters
);
virtual
PassType
startBatch
(
int64_t
batchSize
);
...
...
paddle/trainer/Trainer.cpp
浏览文件 @
8bd47522
...
...
@@ -537,7 +537,7 @@ void Trainer::trainOnePassBatch(int passId) {
trainerInternal_
.
getGradientMachine
()
->
onPassEnd
();
bool
accepted
=
trainerInternal_
.
getParameterUpdater
()
->
finishPass
(
cost
);
bool
accepted
=
trainerInternal_
.
getParameterUpdater
()
->
finishPass
();
globalStat
.
setThreadInfo
(
true
);
globalStat
.
printAllStatus
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录