Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
7b3f2de2
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看板
未验证
提交
7b3f2de2
编写于
10月 31, 2018
作者:
X
xiebaiyuan
提交者:
GitHub
10月 31, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1230 from yangfei963158659/develop
repair bug of softmax and conv_add_relu op
上级
cf51610e
643f397f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
20 addition
and
9 deletion
+20
-9
src/operators/fusion_conv_add_relu_op.h
src/operators/fusion_conv_add_relu_op.h
+2
-3
src/operators/math/softmax.cpp
src/operators/math/softmax.cpp
+10
-2
tools/android-debug-script/push2android.sh
tools/android-debug-script/push2android.sh
+8
-4
未找到文件。
src/operators/fusion_conv_add_relu_op.h
浏览文件 @
7b3f2de2
...
...
@@ -29,9 +29,8 @@ namespace operators {
class
FusionConvAddReluOpMatcher
:
public
framework
::
FusionOpMatcher
{
public:
FusionConvAddReluOpMatcher
()
{
node_
=
framework
::
Node
(
G_OP_TYPE_CONV
);
node_
>
std
::
make_shared
<
framework
::
Node
>
(
G_OP_TYPE_ELEMENTWISE_ADD
)
>
std
::
make_shared
<
framework
::
Node
>
(
G_OP_TYPE_RELU
);
// node_ = framework::Node(G_OP_TYPE_FUSION_CONV_ADD);
// node_ > std::make_shared<framework::Node>(G_OP_TYPE_RELU);
}
void
FolderNodes
(
...
...
src/operators/math/softmax.cpp
浏览文件 @
7b3f2de2
...
...
@@ -141,15 +141,23 @@ class SoftmaxFuntor<CPU, T> {
public:
void
operator
()(
const
framework
::
Tensor
*
X
,
framework
::
Tensor
*
Y
)
{
const
DDim
dDim
=
X
->
dims
();
int
dim1
=
dDim
[
dDim
.
size
()
-
1
];
int
dim0
=
X
->
numel
()
/
dim1
/
dDim
[
0
];
framework
::
DDim
matrix_shape
=
{
dim0
,
dim1
};
for
(
int
i
=
0
;
i
<
dDim
[
0
];
++
i
)
{
framework
::
Tensor
sub_X
=
X
->
Slice
(
i
,
i
+
1
);
framework
::
Tensor
sub_Y
=
Y
->
Slice
(
i
,
i
+
1
);
sub_X
.
Resize
(
matrix_shape
);
sub_Y
.
Resize
(
matrix_shape
);
for
(
int
j
=
0
;
j
<
dim0
;
j
++
)
{
framework
::
Tensor
sub_x
=
sub_X
.
Slice
(
j
,
j
+
1
);
framework
::
Tensor
sub_y
=
sub_Y
.
Slice
(
j
,
j
+
1
);
#ifdef __ARM_NEON
SoftmaxCacl
(
&
sub_X
,
&
sub_Y
);
SoftmaxCacl
(
&
sub_x
,
&
sub_y
);
#endif
}
}
}
};
template
class
SoftmaxFuntor
<
CPU
,
float
>;
...
...
tools/android-debug-script/push2android.sh
浏览文件 @
7b3f2de2
...
...
@@ -5,9 +5,9 @@ MODELS_PATH="../../test/models/*"
MODELS_SRC
=
"../../test/models"
IMAGE_PATH
=
"../../test/images/*"
EXE_FILE
=
"../../test/build/*"
EXE_DIR
=
"data/local/tmp/bin"
EXE_DIR
=
"
/
data/local/tmp/bin"
adb shell
mkdir
${
EXE_DIR
}
MODELS_DIR
=
"data/local/tmp/models"
MODELS_DIR
=
"
/
data/local/tmp/models"
adb shell
mkdir
${
MODELS_DIR
}
for
file
in
`
ls
${
MODELS_SRC
}
`
do
...
...
@@ -19,11 +19,15 @@ ACL_BUILD_PATH="../../src/operators/kernel/mali/ACL_Android/build/*"
adb push
${
ACL_BUILD_PATH
}
${
EXE_DIR
}
fi
IMAGES_DIR
=
"data/local/tmp/images"
IMAGES_DIR
=
"
/
data/local/tmp/images"
adb shell
mkdir
${
IMAGES_DIR
}
LIB_PATH
=
"../../build/release/arm-v7a/build/*"
adb push
${
EXE_FILE
}
${
EXE_DIR
}
adb push
${
LIB_PATH
}
${
EXE_DIR
}
for
file
in
${
LIB_PATH
}
do
adb push
${
file
}
${
EXE_DIR
}
done
if
[[
$1
!=
"npm"
]]
;
then
adb push
${
IMAGE_PATH
}
${
IMAGES_DIR
}
adb push
${
MODELS_PATH
}
${
MODELS_DIR
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录