Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
4d92a626
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4d92a626
编写于
7月 16, 2018
作者:
L
liuruilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused code
上级
c9deac4a
变更
33
显示空白变更内容
内联
并排
Showing
33 changed file
with
21 addition
and
56 deletion
+21
-56
src/common/variant.h
src/common/variant.h
+1
-1
src/framework/program/program-optimize/node.cpp
src/framework/program/program-optimize/node.cpp
+0
-17
src/framework/program/program-optimize/node.h
src/framework/program/program-optimize/node.h
+0
-3
src/operators/batchnorm_op.cpp
src/operators/batchnorm_op.cpp
+1
-1
src/operators/box_coder_op.cpp
src/operators/box_coder_op.cpp
+1
-1
src/operators/concat_op.cpp
src/operators/concat_op.cpp
+0
-1
src/operators/conv_op.cpp
src/operators/conv_op.cpp
+0
-2
src/operators/depthwise_conv_op.cpp
src/operators/depthwise_conv_op.cpp
+0
-2
src/operators/dropout_op.cpp
src/operators/dropout_op.cpp
+1
-1
src/operators/elementwise_add_op.cpp
src/operators/elementwise_add_op.cpp
+1
-1
src/operators/feed_op.cpp
src/operators/feed_op.cpp
+0
-1
src/operators/fetch_op.cpp
src/operators/fetch_op.cpp
+0
-1
src/operators/fusion_conv_add.cpp
src/operators/fusion_conv_add.cpp
+0
-1
src/operators/fusion_conv_add.h
src/operators/fusion_conv_add.h
+0
-2
src/operators/fusion_conv_add_bn_relu_op.cpp
src/operators/fusion_conv_add_bn_relu_op.cpp
+1
-1
src/operators/fusion_conv_add_bn_relu_op.h
src/operators/fusion_conv_add_bn_relu_op.h
+0
-2
src/operators/fusion_fc_op.cpp
src/operators/fusion_fc_op.cpp
+0
-1
src/operators/im2sequence_op.cpp
src/operators/im2sequence_op.cpp
+0
-2
src/operators/lrn_op.cpp
src/operators/lrn_op.cpp
+1
-1
src/operators/mul_op.cpp
src/operators/mul_op.cpp
+1
-1
src/operators/multiclass_nms_op.cpp
src/operators/multiclass_nms_op.cpp
+1
-1
src/operators/op_param.h
src/operators/op_param.h
+1
-1
src/operators/pool_op.cpp
src/operators/pool_op.cpp
+1
-1
src/operators/prelu_op.cpp
src/operators/prelu_op.cpp
+1
-1
src/operators/prior_box_op.cpp
src/operators/prior_box_op.cpp
+1
-1
src/operators/relu_op.cpp
src/operators/relu_op.cpp
+1
-1
src/operators/reshape_op.cpp
src/operators/reshape_op.cpp
+1
-1
src/operators/resize_op.cpp
src/operators/resize_op.cpp
+1
-1
src/operators/scale_op.cpp
src/operators/scale_op.cpp
+1
-1
src/operators/sigmoid_op.cpp
src/operators/sigmoid_op.cpp
+1
-1
src/operators/slice_op.cpp
src/operators/slice_op.cpp
+1
-1
src/operators/softmax_op.cpp
src/operators/softmax_op.cpp
+1
-1
src/operators/transpose_op.cpp
src/operators/transpose_op.cpp
+1
-1
未找到文件。
src/common/variant.h
浏览文件 @
4d92a626
...
...
@@ -84,7 +84,7 @@ struct Variant {
if
(
type_id
==
typeid
(
T
).
hash_code
())
{
return
*
const_cast
<
T
*>
(
reinterpret_cast
<
const
T
*>
(
&
data
));
}
else
{
PADDLE_MOBILE_THROW_EXCEPTION
(
" bad cast in variant
"
);
PADDLE_MOBILE_THROW_EXCEPTION
(
" bad cast in variant"
);
exit
(
0
);
}
}
...
...
src/framework/program/program-optimize/node.cpp
浏览文件 @
4d92a626
...
...
@@ -44,23 +44,6 @@ bool Node::operator==(const Node &in) {
return
true
;
}
std
::
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
Node
::
OpDescs
(
int
size
)
{
std
::
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
op_descs
;
OpDescs
(
size
-
1
,
&
op_descs
);
return
op_descs
;
}
void
Node
::
OpDescs
(
int
index
,
std
::
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
*
op_desc
)
{
if
(
index
==
0
)
{
return
;
}
op_desc
->
push_back
(
this
->
op_desc_
);
for
(
auto
&
output
:
outputs_
)
{
output
->
OpDescs
(
index
,
op_desc
);
}
}
std
::
shared_ptr
<
Node
>
Node
::
To
(
int
size
)
{
std
::
shared_ptr
<
Node
>
node
=
std
::
make_shared
<
Node
>
();
this
->
To
(
size
-
1
,
node
);
...
...
src/framework/program/program-optimize/node.h
浏览文件 @
4d92a626
...
...
@@ -47,13 +47,10 @@ class Node {
std
::
map
<
std
::
string
,
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>>>
change
,
std
::
vector
<
std
::
shared_ptr
<
Node
>>
*
removed_nodes
);
std
::
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
OpDescs
(
int
size
);
std
::
shared_ptr
<
framework
::
OpDesc
>
OpDescOfNode
()
{
return
op_desc_
;
}
std
::
string
Type
()
{
return
type_
;
}
private:
void
OpDescs
(
int
size
,
std
::
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
*
op_desc
);
void
To
(
int
index
,
std
::
shared_ptr
<
Node
>
);
void
Folder
(
std
::
shared_ptr
<
framework
::
OpDesc
>
op_desc
,
...
...
src/operators/batchnorm_op.cpp
浏览文件 @
4d92a626
...
...
@@ -26,7 +26,7 @@ void BatchNormOp<Dtype, T>::InferShape() const {
auto
x_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
OutputY
()
->
Resize
(
x_dims
);
}
template
class
BatchNormOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/box_coder_op.cpp
浏览文件 @
4d92a626
...
...
@@ -47,7 +47,7 @@ void BoxCoderOp<Dtype, T>::InferShape() const {
this
->
param_
.
OutputBox
()
->
Resize
(
framework
::
make_ddim
(
{
input_targetbox_dims
[
0
],
input_priorbox_dims
[
0
],
4
}));
}
template
class
BoxCoderOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/concat_op.cpp
浏览文件 @
4d92a626
...
...
@@ -56,7 +56,6 @@ void ConcatOp<Dtype, T>::InferShape() const {
this
->
param_
.
Out
()
->
Resize
(
out_dims
);
}
template
class
ConcatOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/conv_op.cpp
浏览文件 @
4d92a626
...
...
@@ -48,8 +48,6 @@ void ConvOp<Dtype, T>::InferShape() const {
this
->
param_
.
Output
()
->
Resize
(
ddim
);
}
template
class
ConvOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/depthwise_conv_op.cpp
浏览文件 @
4d92a626
...
...
@@ -49,8 +49,6 @@ void DepthwiseConvOp<Dtype, T>::InferShape() const {
this
->
param_
.
Output
()
->
Resize
(
ddim
);
}
template
class
DepthwiseConvOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/dropout_op.cpp
浏览文件 @
4d92a626
...
...
@@ -22,7 +22,7 @@ void DropoutOp<Dtype, T>::InferShape() const {
auto
input_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
input_dims
);
}
template
class
DropoutOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/elementwise_add_op.cpp
浏览文件 @
4d92a626
...
...
@@ -24,7 +24,7 @@ void ElementwiseAddOp<Dtype, T>::InferShape() const {
auto
x_dim
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
x_dim
);
}
template
class
ElementwiseAddOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/feed_op.cpp
浏览文件 @
4d92a626
...
...
@@ -16,7 +16,6 @@ limitations under the License. */
namespace
paddle_mobile
{
namespace
operators
{
template
class
FeedOp
<
CPU
,
float
>;
}
}
// namespace paddle_mobile
...
...
src/operators/fetch_op.cpp
浏览文件 @
4d92a626
...
...
@@ -16,7 +16,6 @@ limitations under the License. */
namespace
paddle_mobile
{
namespace
operators
{
template
class
FetchOp
<
CPU
,
float
>;
}
}
// namespace paddle_mobile
...
...
src/operators/fusion_conv_add.cpp
浏览文件 @
4d92a626
...
...
@@ -45,7 +45,6 @@ void FusionConvAddOp<Dtype, T>::InferShape() const {
this
->
param_
.
Output
()
->
Resize
(
ddim
);
}
template
class
FusionConvAddOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/fusion_conv_add.h
浏览文件 @
4d92a626
...
...
@@ -36,8 +36,6 @@ class FusionConvAddMatcher : public framework::FusionOpMatcher {
void
FolderNodes
(
framework
::
Node
*
node
,
std
::
vector
<
std
::
shared_ptr
<
framework
::
Node
>>
*
removed_nodes
)
{
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
origin_descs
=
node
->
OpDescs
(
node_
.
Depth
());
node
->
Folder
(
node_
.
Depth
(),
Type
(),
{{
G_OP_TYPE_ELEMENTWISE_ADD
,
{{
"Y"
,
"Y"
}}}},
removed_nodes
);
}
...
...
src/operators/fusion_conv_add_bn_relu_op.cpp
浏览文件 @
4d92a626
...
...
@@ -44,7 +44,7 @@ void FusionConvAddBNReluOp<Dtype, T>::InferShape() const {
framework
::
DDim
ddim
=
framework
::
make_ddim
(
output_shape
);
this
->
param_
.
Output
()
->
Resize
(
ddim
);
}
template
class
FusionConvAddBNReluOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/fusion_conv_add_bn_relu_op.h
浏览文件 @
4d92a626
...
...
@@ -39,8 +39,6 @@ class FusionConvAddBNReluMatcher : public framework::FusionOpMatcher {
void
FolderNodes
(
framework
::
Node
*
node
,
std
::
vector
<
std
::
shared_ptr
<
framework
::
Node
>>
*
removed_nodes
)
{
vector
<
std
::
shared_ptr
<
framework
::
OpDesc
>>
origin_descs
=
node
->
OpDescs
(
node_
.
Depth
());
node
->
Folder
(
node_
.
Depth
(),
Type
(),
{{
G_OP_TYPE_ELEMENTWISE_ADD
,
{{
"Y"
,
"Y"
}}},
{
G_OP_TYPE_BATCHNORM
,
...
...
src/operators/fusion_fc_op.cpp
浏览文件 @
4d92a626
...
...
@@ -50,7 +50,6 @@ void FusionFcOp<Dtype, T>::InferShape() const {
this
->
param_
.
Out
()
->
Resize
(
ddim
);
}
template
class
FusionFcOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/im2sequence_op.cpp
浏览文件 @
4d92a626
...
...
@@ -47,8 +47,6 @@ void Im2SequenceOp<Dtype, T>::InferShape() const {
this
->
param_
.
Output
()
->
Resize
(
ddim
);
}
template
class
Im2SequenceOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/lrn_op.cpp
浏览文件 @
4d92a626
...
...
@@ -24,7 +24,7 @@ void LrnOp<Dtype, T>::InferShape() const {
auto
x_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
x_dims
);
}
template
class
LrnOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/mul_op.cpp
浏览文件 @
4d92a626
...
...
@@ -50,7 +50,7 @@ void MulOp<Dtype, T>::InferShape() const {
framework
::
DDim
ddim
=
framework
::
make_ddim
(
output_dims
);
this
->
param_
.
Out
()
->
Resize
(
ddim
);
}
template
class
MulOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/multiclass_nms_op.cpp
浏览文件 @
4d92a626
...
...
@@ -34,7 +34,7 @@ void MultiClassNMSOp<Dtype, T>::InferShape() const {
// pre size, will change in Compute.
this
->
param_
.
Out
()
->
Resize
(
framework
::
make_ddim
({
input_bboxes_dims
[
1
],
6
}));
}
template
class
MultiClassNMSOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/op_param.h
浏览文件 @
4d92a626
...
...
@@ -371,7 +371,7 @@ class BatchNormParam : OpParam {
input_variance_
=
InputVarianceFrom
<
LoDTensor
>
(
inputs
,
scope
);
epsilon_
=
GetAttr
<
float
>
(
"epsilon"
,
attrs
);
momentum_
=
GetAttr
<
float
>
(
"momentum"
,
attrs
);
is_test_
=
GetAttr
<
bool
>
(
"is_test"
,
attrs
);
//
is_test_ = GetAttr<bool>("is_test", attrs);
}
const
Tensor
*
InputX
()
const
{
return
input_x_
;
}
...
...
src/operators/pool_op.cpp
浏览文件 @
4d92a626
...
...
@@ -54,7 +54,7 @@ void PoolOp<DeviceType, T>::InferShape() const {
}
this
->
param_
.
Output
()
->
Resize
(
framework
::
make_ddim
(
output_shape
));
}
template
class
PoolOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/prelu_op.cpp
浏览文件 @
4d92a626
...
...
@@ -23,7 +23,7 @@ void PReluOp<Dtype, T>::InferShape() const {
auto
input_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
input_dims
);
}
template
class
PReluOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/prior_box_op.cpp
浏览文件 @
4d92a626
...
...
@@ -44,7 +44,7 @@ void PriorBoxOp<Dtype, T>::InferShape() const {
this
->
param_
.
OutputBoxes
()
->
Resize
(
framework
::
make_ddim
(
dim_vec
));
this
->
param_
.
OutputVariances
()
->
Resize
(
framework
::
make_ddim
(
dim_vec
));
}
template
class
PriorBoxOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/relu_op.cpp
浏览文件 @
4d92a626
...
...
@@ -23,7 +23,7 @@ void ReluOp<Dtype, T>::InferShape() const {
auto
input_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
input_dims
);
}
template
class
ReluOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/reshape_op.cpp
浏览文件 @
4d92a626
...
...
@@ -27,7 +27,7 @@ void ReshapeOp<Dtype, T>::InferShape() const {
auto
out_dims
=
ValidateShape
(
shape
,
input_x_dims
);
this
->
param_
.
Out
()
->
Resize
(
out_dims
);
}
template
class
ReshapeOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/resize_op.cpp
浏览文件 @
4d92a626
...
...
@@ -24,7 +24,7 @@ void ResizeOp<Dtype, T>::InferShape() const {
auto
out_dims
=
CalOutputShape
(
this
->
param_
);
this
->
param_
.
Out
()
->
Resize
(
out_dims
);
}
template
class
ResizeOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/scale_op.cpp
浏览文件 @
4d92a626
...
...
@@ -24,7 +24,7 @@ void ScaleOp<Dtype, T>::InferShape() const {
auto
input_dims
=
this
->
param_
.
InputX
()
->
dims
();
this
->
param_
.
Out
()
->
Resize
(
input_dims
);
}
template
class
ScaleOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/sigmoid_op.cpp
浏览文件 @
4d92a626
...
...
@@ -22,7 +22,7 @@ template <typename DeviceType, typename T>
void
SigmoidOp
<
DeviceType
,
T
>::
InferShape
()
const
{
this
->
param_
.
Out
()
->
Resize
(
this
->
param_
.
InputX
()
->
dims
());
}
template
class
SigmoidOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/slice_op.cpp
浏览文件 @
4d92a626
...
...
@@ -23,7 +23,7 @@ template <typename Dtype, typename T>
void
SliceOp
<
Dtype
,
T
>::
InferShape
()
const
{
/// todo: add InputShape() detection.
}
template
class
SliceOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/softmax_op.cpp
浏览文件 @
4d92a626
...
...
@@ -22,7 +22,7 @@ template <typename DeviceType, typename T>
void
SoftmaxOp
<
DeviceType
,
T
>::
InferShape
()
const
{
this
->
param_
.
Out
()
->
Resize
(
this
->
param_
.
InputX
()
->
dims
());
}
template
class
SoftmaxOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
src/operators/transpose_op.cpp
浏览文件 @
4d92a626
...
...
@@ -47,7 +47,7 @@ void TransposeOp<Dtype, T>::InferShape() const {
}
this
->
param_
.
Out
()
->
Resize
(
out_dims
);
}
template
class
TransposeOp
<
CPU
,
float
>;
}
// namespace operators
}
// namespace paddle_mobile
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录