Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
3415e264
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看板
提交
3415e264
编写于
10月 31, 2017
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove some layers in mobile inference library.
上级
2368377a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
48 addition
and
4 deletion
+48
-4
paddle/cuda/CMakeLists.txt
paddle/cuda/CMakeLists.txt
+2
-0
paddle/gserver/CMakeLists.txt
paddle/gserver/CMakeLists.txt
+42
-2
paddle/gserver/layers/Layer.cpp
paddle/gserver/layers/Layer.cpp
+1
-1
paddle/gserver/tests/CMakeLists.txt
paddle/gserver/tests/CMakeLists.txt
+3
-1
未找到文件。
paddle/cuda/CMakeLists.txt
浏览文件 @
3415e264
...
...
@@ -27,7 +27,9 @@ if(WITH_GPU)
set_source_files_properties
(
${
CUDA_CXX_SOURCES
}
PROPERTIES COMPILE_FLAGS
"-D__NVCC__"
)
else
()
if
(
NOT MOBILE_INFERENCE
)
set
(
CUDA_CXX_SOURCES src/hl_warpctc_wrap.cc
)
endif
()
endif
()
set
(
CUDA_CU_SOURCES
...
...
paddle/gserver/CMakeLists.txt
浏览文件 @
3415e264
...
...
@@ -85,9 +85,49 @@ if(MOBILE_INFERENCE)
gradientmachines/GradientMachineMode.cpp
gradientmachines/MultiGradientMachine.cpp
)
# Remove
useless layers
# Remove
layers that used in training
list
(
REMOVE_ITEM GSERVER_SOURCES
layers/RecurrentLayerGroup.cpp
)
layers/RecurrentLayerGroup.cpp
layers/CostLayer.cpp
layers/MultiBoxLossLayer.cpp
layers/WarpCTCLayer.cpp
layers/CTCLayer.cpp
layers/LinearChainCTC.cpp
layers/PrintLayer.cpp
)
list
(
REMOVE_ITEM GSERVER_SOURCES
layers/OuterProdLayer.cpp
layers/SumToOneNormLayer.cpp
layers/ConvShiftLayer.cpp
layers/InterpolationLayer.cpp
layers/AgentLayer.cpp
layers/DotMulOperator.cpp
layers/GruStepLayer.cpp
layers/LstmStepLayer.cpp
layers/ConvexCombinationLayer.cpp
layers/Conv3DLayer.cpp
layers/DeConv3DLayer.cpp
layers/CropLayer.cpp
layers/CrossEntropyOverBeam.cpp
layers/DataNormLayer.cpp
layers/FeatureMapExpandLayer.cpp
layers/HierarchicalSigmoidLayer.cpp
layers/MultinomialSampler.cpp
layers/NCELayer.cpp
layers/KmaxSeqScoreLayer.cpp
layers/MDLstmLayer.cpp
layers/MultiplexLayer.cpp
layers/PadLayer.cpp
layers/Pool3DLayer.cpp
layers/ResizeLayer.cpp
layers/RotateLayer.cpp
layers/RowConvLayer.cpp
layers/RowL2NormLayer.cpp
layers/SamplingIdLayer.cpp
layers/ScaleShiftLayer.cpp
layers/SelectiveFullyConnectedLayer.cpp
layers/SpatialPyramidPoolLayer.cpp
layers/BilinearInterpLayer.cpp
layers/ClipLayer.cpp
)
endif
()
if
(
WITH_GPU
)
...
...
paddle/gserver/layers/Layer.cpp
浏览文件 @
3415e264
...
...
@@ -98,6 +98,7 @@ ClassRegistrar<Layer, LayerConfig> Layer::registrar_;
LayerPtr
Layer
::
create
(
const
LayerConfig
&
config
)
{
std
::
string
type
=
config
.
type
();
#ifndef PADDLE_MOBILE_INFERENCE
// NOTE: As following types have illegal character '-',
// they can not use REGISTER_LAYER to registrar.
// Besides, to fit with old training models,
...
...
@@ -106,7 +107,6 @@ LayerPtr Layer::create(const LayerConfig& config) {
return
LayerPtr
(
new
MultiClassCrossEntropy
(
config
));
else
if
(
type
==
"rank-cost"
)
return
LayerPtr
(
new
RankingCost
(
config
));
#ifndef PADDLE_MOBILE_INFERENCE
else
if
(
type
==
"auc-validation"
)
return
LayerPtr
(
new
AucValidation
(
config
));
else
if
(
type
==
"pnpair-validation"
)
...
...
paddle/gserver/tests/CMakeLists.txt
浏览文件 @
3415e264
...
...
@@ -112,8 +112,10 @@ endif()
################ test_LinearChainCRF ####################
add_simple_unittest
(
test_LinearChainCRF
)
if
(
NOT MOBILE_INFERENCE
)
############## test_MultinomialSampler ###################
add_simple_unittest
(
test_MultinomialSampler
)
endif
()
############## test_PyDataProvider ########################
if
(
WITH_PYTHON
)
...
...
@@ -129,7 +131,7 @@ endif()
add_simple_unittest
(
test_RecurrentLayer
)
############### test_WarpCTCLayer #######################
if
(
NOT WITH_DOUBLE
)
if
(
NOT WITH_DOUBLE
AND NOT MOBILE_INFERENCE
)
add_unittest_without_exec
(
test_WarpCTCLayer
test_WarpCTCLayer.cpp
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录