File tree 3 files changed +20
-9
lines changed
tools/android-debug-script
3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,8 @@ namespace operators {
29
29
class FusionConvAddReluOpMatcher : public framework ::FusionOpMatcher {
30
30
public:
31
31
FusionConvAddReluOpMatcher () {
32
- node_ = framework::Node (G_OP_TYPE_CONV);
33
- node_ > std::make_shared<framework::Node>(G_OP_TYPE_ELEMENTWISE_ADD) >
34
- std::make_shared<framework::Node>(G_OP_TYPE_RELU);
32
+ // node_ = framework::Node(G_OP_TYPE_FUSION_CONV_ADD);
33
+ // node_ > std::make_shared<framework::Node>(G_OP_TYPE_RELU);
35
34
}
36
35
37
36
void FolderNodes (
Original file line number Diff line number Diff line change @@ -141,13 +141,21 @@ class SoftmaxFuntor<CPU, T> {
141
141
public:
142
142
void operator ()(const framework::Tensor *X, framework::Tensor *Y) {
143
143
const DDim dDim = X->dims ();
144
+ int dim1 = dDim[dDim.size () - 1 ];
145
+ int dim0 = X->numel () / dim1 / dDim[0 ];
146
+ framework::DDim matrix_shape = {dim0, dim1};
144
147
for (int i = 0 ; i < dDim[0 ]; ++i) {
145
148
framework::Tensor sub_X = X->Slice (i, i + 1 );
146
149
framework::Tensor sub_Y = Y->Slice (i, i + 1 );
147
-
150
+ sub_X.Resize (matrix_shape);
151
+ sub_Y.Resize (matrix_shape);
152
+ for (int j = 0 ; j < dim0; j++) {
153
+ framework::Tensor sub_x = sub_X.Slice (j, j + 1 );
154
+ framework::Tensor sub_y = sub_Y.Slice (j, j + 1 );
148
155
#ifdef __ARM_NEON
149
- SoftmaxCacl (&sub_X , &sub_Y );
156
+ SoftmaxCacl (&sub_x , &sub_y );
150
157
#endif
158
+ }
151
159
}
152
160
}
153
161
};
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ MODELS_PATH="../../test/models/*"
5
5
MODELS_SRC=" ../../test/models"
6
6
IMAGE_PATH=" ../../test/images/*"
7
7
EXE_FILE=" ../../test/build/*"
8
- EXE_DIR=" data/local/tmp/bin"
8
+ EXE_DIR=" / data/local/tmp/bin"
9
9
adb shell mkdir ${EXE_DIR}
10
- MODELS_DIR=" data/local/tmp/models"
10
+ MODELS_DIR=" / data/local/tmp/models"
11
11
adb shell mkdir ${MODELS_DIR}
12
12
for file in ` ls ${MODELS_SRC} `
13
13
do
@@ -19,11 +19,15 @@ ACL_BUILD_PATH="../../src/operators/kernel/mali/ACL_Android/build/*"
19
19
adb push ${ACL_BUILD_PATH} ${EXE_DIR}
20
20
fi
21
21
22
- IMAGES_DIR=" data/local/tmp/images"
22
+ IMAGES_DIR=" / data/local/tmp/images"
23
23
adb shell mkdir ${IMAGES_DIR}
24
24
LIB_PATH=" ../../build/release/arm-v7a/build/*"
25
25
adb push ${EXE_FILE} ${EXE_DIR}
26
- adb push ${LIB_PATH} ${EXE_DIR}
26
+ for file in ${LIB_PATH}
27
+ do
28
+ adb push ${file} ${EXE_DIR}
29
+ done
30
+
27
31
if [[ $1 != " npm" ]]; then
28
32
adb push ${IMAGE_PATH} ${IMAGES_DIR}
29
33
adb push ${MODELS_PATH} ${MODELS_DIR}
You can’t perform that action at this time.
0 commit comments