Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
adad8d9e
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
adad8d9e
编写于
10月 09, 2017
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Open WITH_TESTING option.
上级
6627801a
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
48 addition
and
54 deletion
+48
-54
CMakeLists.txt
CMakeLists.txt
+0
-4
paddle/capi/tests/CMakeLists.txt
paddle/capi/tests/CMakeLists.txt
+9
-8
paddle/gserver/tests/CMakeLists.txt
paddle/gserver/tests/CMakeLists.txt
+39
-31
paddle/gserver/tests/LayerGradUtil.h
paddle/gserver/tests/LayerGradUtil.h
+0
-1
paddle/gserver/tests/test_ActivationGrad.cpp
paddle/gserver/tests/test_ActivationGrad.cpp
+0
-1
paddle/gserver/tests/test_BatchNorm.cpp
paddle/gserver/tests/test_BatchNorm.cpp
+0
-1
paddle/gserver/tests/test_CRFLayerGrad.cpp
paddle/gserver/tests/test_CRFLayerGrad.cpp
+0
-1
paddle/gserver/tests/test_ConvTrans.cpp
paddle/gserver/tests/test_ConvTrans.cpp
+0
-1
paddle/gserver/tests/test_ConvUnify.cpp
paddle/gserver/tests/test_ConvUnify.cpp
+0
-1
paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp
paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp
+0
-1
paddle/gserver/tests/test_KmaxSeqScore.cpp
paddle/gserver/tests/test_KmaxSeqScore.cpp
+0
-1
paddle/gserver/tests/test_LayerGrad.cpp
paddle/gserver/tests/test_LayerGrad.cpp
+0
-1
paddle/gserver/tests/test_SelectiveFCLayer.cpp
paddle/gserver/tests/test_SelectiveFCLayer.cpp
+0
-1
paddle/gserver/tests/test_SeqSliceLayerGrad.cpp
paddle/gserver/tests/test_SeqSliceLayerGrad.cpp
+0
-1
未找到文件。
CMakeLists.txt
浏览文件 @
adad8d9e
...
@@ -94,10 +94,6 @@ if(ANDROID OR IOS)
...
@@ -94,10 +94,6 @@ if(ANDROID OR IOS)
endif
()
endif
()
set
(
MOBILE_INFERENCE ON
)
set
(
MOBILE_INFERENCE ON
)
add_definitions
(
-DPADDLE_MOBILE_INFERENCE
)
add_definitions
(
-DPADDLE_MOBILE_INFERENCE
)
# TODO: Need Open the WITH_TESTING
set
(
WITH_TESTING OFF CACHE STRING
"Disable TESTING when cross-compiling
for Android and iOS"
FORCE
)
endif
()
endif
()
set
(
THIRD_PARTY_PATH
"
${
CMAKE_BINARY_DIR
}
/third_party"
CACHE STRING
set
(
THIRD_PARTY_PATH
"
${
CMAKE_BINARY_DIR
}
/third_party"
CACHE STRING
...
...
paddle/capi/tests/CMakeLists.txt
浏览文件 @
adad8d9e
...
@@ -4,11 +4,12 @@ add_unittest(capi_test_mats test_Vector.cpp
...
@@ -4,11 +4,12 @@ add_unittest(capi_test_mats test_Vector.cpp
target_include_directories
(
capi_test_mats PUBLIC
${
PADDLE_CAPI_INC_PATH
}
)
target_include_directories
(
capi_test_mats PUBLIC
${
PADDLE_CAPI_INC_PATH
}
)
target_link_libraries
(
capi_test_mats paddle_capi
)
target_link_libraries
(
capi_test_mats paddle_capi
)
if
(
NOT MOBILE_INFERENCE
)
add_unittest_without_exec
(
capi_test_gradientMachine test_GradientMachine.cpp
)
add_unittest_without_exec
(
capi_test_gradientMachine test_GradientMachine.cpp
)
target_include_directories
(
capi_test_gradientMachine PUBLIC
target_include_directories
(
capi_test_gradientMachine PUBLIC
${
PADDLE_CAPI_INC_PATH
}
)
${
PADDLE_CAPI_INC_PATH
}
)
target_link_libraries
(
capi_test_gradientMachine paddle_capi
)
target_link_libraries
(
capi_test_gradientMachine paddle_capi
)
add_test
(
NAME capi_test_gradientMachine
add_test
(
NAME capi_test_gradientMachine
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/capi_test_gradientMachine
COMMAND
${
PADDLE_SOURCE_DIR
}
/paddle/.set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/capi_test_gradientMachine
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/capi/tests
)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle/capi/tests
)
endif
()
paddle/gserver/tests/CMakeLists.txt
浏览文件 @
adad8d9e
# gserver pacakge unittests
# gserver pacakge unittests
if
(
NOT MOBILE_INFERENCE
)
################### test_ProtoDataProvider ############
################### test_ProtoDataProvider ############
add_unittest_without_exec
(
test_ProtoDataProvider
add_unittest_without_exec
(
test_ProtoDataProvider
test_ProtoDataProvider.cpp
)
test_ProtoDataProvider.cpp
)
# test_ProtoDataProvider will mkdir as same name,
# test_ProtoDataProvider will mkdir as same name,
# so if WORKING_DIRECTORY is default directory, then
# so if WORKING_DIRECTORY is default directory, then
# mkdir will get error.
# mkdir will get error.
add_test
(
NAME test_ProtoDataProvider
add_test
(
NAME test_ProtoDataProvider
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_ProtoDataProvider
COMMAND
${
CMAKE_CURRENT_BINARY_DIR
}
/test_ProtoDataProvider
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
################# test_LayerGrad #######################
################# test_LayerGrad #######################
add_unittest_without_exec
(
test_LayerGrad
add_unittest_without_exec
(
test_LayerGrad
...
@@ -98,9 +100,11 @@ add_unittest_without_exec(test_KmaxSeqScore
...
@@ -98,9 +100,11 @@ add_unittest_without_exec(test_KmaxSeqScore
add_test
(
NAME test_KmaxSeqScore
add_test
(
NAME test_KmaxSeqScore
COMMAND test_KmaxSeqScore
)
COMMAND test_KmaxSeqScore
)
if
(
NOT MOBILE_INFERENCE
)
################## test_Evaluator #######################
################## test_Evaluator #######################
add_unittest
(
test_Evaluator
add_unittest
(
test_Evaluator
test_Evaluator.cpp
)
test_Evaluator.cpp
)
endif
()
################ test_LinearChainCRF ####################
################ test_LinearChainCRF ####################
add_simple_unittest
(
test_LinearChainCRF
)
add_simple_unittest
(
test_LinearChainCRF
)
...
@@ -131,27 +135,31 @@ if(NOT WITH_DOUBLE)
...
@@ -131,27 +135,31 @@ if(NOT WITH_DOUBLE)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
endif
()
if
(
NOT MOBILE_INFERENCE
)
############### test_RecurrentGradientMachine ###############
############### test_RecurrentGradientMachine ###############
# TODO(yuyang18): There is some bug in test_RecurrentGradientMachine
# TODO(yuyang18): There is some bug in test_RecurrentGradientMachine
# I will fix it.
# I will fix it.
add_unittest_without_exec
(
test_RecurrentGradientMachine
add_unittest_without_exec
(
test_RecurrentGradientMachine
test_RecurrentGradientMachine.cpp
)
test_RecurrentGradientMachine.cpp
)
add_test
(
NAME test_RecurrentGradientMachine
add_test
(
NAME test_RecurrentGradientMachine
COMMAND .set_python_path.sh -d
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
${
PADDLE_SOURCE_DIR
}
/python:
${
PADDLE_SOURCE_DIR
}
/paddle/gserver/tests
${
CMAKE_CURRENT_BINARY_DIR
}
/test_RecurrentGradientMachine
${
CMAKE_CURRENT_BINARY_DIR
}
/test_RecurrentGradientMachine
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
add_unittest_without_exec
(
test_NetworkCompare
test_NetworkCompare.cpp
)
if
(
NOT MOBILE_INFERENCE
)
if
(
WITH_GPU
)
add_unittest_without_exec
(
test_NetworkCompare
add_test
(
NAME test_NetworkCompare
test_NetworkCompare.cpp
)
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=true
if
(
WITH_GPU
)
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
add_test
(
NAME test_NetworkCompare
else
()
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=true
add_test
(
NAME test_NetworkCompare
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=false
else
()
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
add_test
(
NAME test_NetworkCompare
COMMAND .set_python_path.sh -d
${
PADDLE_SOURCE_DIR
}
/python
${
CMAKE_CURRENT_BINARY_DIR
}
/test_NetworkCompare --use_gpu=false
WORKING_DIRECTORY
${
PADDLE_SOURCE_DIR
}
/paddle
)
endif
()
endif
()
endif
()
...
...
paddle/gserver/tests/LayerGradUtil.h
浏览文件 @
adad8d9e
...
@@ -15,7 +15,6 @@ limitations under the License. */
...
@@ -15,7 +15,6 @@ limitations under the License. */
#pragma once
#pragma once
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
using
namespace
std
;
// NOLINT
using
namespace
std
;
// NOLINT
...
...
paddle/gserver/tests/test_ActivationGrad.cpp
浏览文件 @
adad8d9e
...
@@ -17,7 +17,6 @@ limitations under the License. */
...
@@ -17,7 +17,6 @@ limitations under the License. */
#include <vector>
#include <vector>
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
...
...
paddle/gserver/tests/test_BatchNorm.cpp
浏览文件 @
adad8d9e
...
@@ -17,7 +17,6 @@ limitations under the License. */
...
@@ -17,7 +17,6 @@ limitations under the License. */
#include <vector>
#include <vector>
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "paddle/utils/GlobalConstants.h"
#include "paddle/utils/GlobalConstants.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
...
...
paddle/gserver/tests/test_CRFLayerGrad.cpp
浏览文件 @
adad8d9e
...
@@ -16,7 +16,6 @@ limitations under the License. */
...
@@ -16,7 +16,6 @@ limitations under the License. */
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/LinearChainCRF.h"
#include "paddle/gserver/layers/LinearChainCRF.h"
#include "paddle/trainer/Trainer.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
...
...
paddle/gserver/tests/test_ConvTrans.cpp
浏览文件 @
adad8d9e
...
@@ -18,7 +18,6 @@ limitations under the License. */
...
@@ -18,7 +18,6 @@ limitations under the License. */
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/math/MathUtils.h"
#include "paddle/math/MathUtils.h"
#include "paddle/trainer/Trainer.h"
#include "paddle/utils/GlobalConstants.h"
#include "paddle/utils/GlobalConstants.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
...
...
paddle/gserver/tests/test_ConvUnify.cpp
浏览文件 @
adad8d9e
...
@@ -18,7 +18,6 @@ limitations under the License. */
...
@@ -18,7 +18,6 @@ limitations under the License. */
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/math/MathUtils.h"
#include "paddle/math/MathUtils.h"
#include "paddle/trainer/Trainer.h"
#include "paddle/utils/GlobalConstants.h"
#include "paddle/utils/GlobalConstants.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
...
...
paddle/gserver/tests/test_CrossEntropyOverBeamGrad.cpp
浏览文件 @
adad8d9e
...
@@ -18,7 +18,6 @@ limitations under the License. */
...
@@ -18,7 +18,6 @@ limitations under the License. */
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
...
...
paddle/gserver/tests/test_KmaxSeqScore.cpp
浏览文件 @
adad8d9e
...
@@ -18,7 +18,6 @@ limitations under the License. */
...
@@ -18,7 +18,6 @@ limitations under the License. */
#include <vector>
#include <vector>
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "paddle/utils/GlobalConstants.h"
#include "paddle/utils/GlobalConstants.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
...
...
paddle/gserver/tests/test_LayerGrad.cpp
浏览文件 @
adad8d9e
...
@@ -21,7 +21,6 @@ limitations under the License. */
...
@@ -21,7 +21,6 @@ limitations under the License. */
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/math/MathUtils.h"
#include "paddle/math/MathUtils.h"
#include "paddle/trainer/Trainer.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
...
...
paddle/gserver/tests/test_SelectiveFCLayer.cpp
浏览文件 @
adad8d9e
...
@@ -24,7 +24,6 @@ limitations under the License. */
...
@@ -24,7 +24,6 @@ limitations under the License. */
#include "paddle/gserver/layers/Layer.h"
#include "paddle/gserver/layers/Layer.h"
#include "paddle/gserver/layers/SelectiveFullyConnectedLayer.h"
#include "paddle/gserver/layers/SelectiveFullyConnectedLayer.h"
#include "paddle/math/CpuSparseMatrix.h"
#include "paddle/math/CpuSparseMatrix.h"
#include "paddle/trainer/Trainer.h"
using
namespace
paddle
;
// NOLINT
using
namespace
paddle
;
// NOLINT
using
namespace
std
;
// NOLINT
using
namespace
std
;
// NOLINT
...
...
paddle/gserver/tests/test_SeqSliceLayerGrad.cpp
浏览文件 @
adad8d9e
...
@@ -15,7 +15,6 @@ limitations under the License. */
...
@@ -15,7 +15,6 @@ limitations under the License. */
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include "ModelConfig.pb.h"
#include "ModelConfig.pb.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/gserver/layers/DataLayer.h"
#include "paddle/trainer/Trainer.h"
#include "LayerGradUtil.h"
#include "LayerGradUtil.h"
#include "paddle/testing/TestUtil.h"
#include "paddle/testing/TestUtil.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录