Skip to content

Commit e9ff248

Browse files
committed
[EXAMPLES][HAR] make it compatible with the latest lib changes
1 parent 2a6a262 commit e9ff248

File tree

5 files changed

+651
-1159
lines changed

5 files changed

+651
-1159
lines changed

examples/auxiliary/examples_aux.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,9 @@ static inline int arg_max(mli_tensor * net_output_) {
342342
};
343343

344344
int pred_label = 0;
345-
mli_tensor out_tensor;
345+
mli_tensor out_tensor = { 0 };
346346
out_tensor.data.mem.pi32 = &pred_label;
347+
out_tensor.data.capacity = sizeof(pred_label);
347348
out_tensor.el_type = MLI_EL_SA_32;
348349
out_tensor.rank = 2;
349350
out_tensor.shape[0] = 1;

examples/example_har_smartphone/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ configuration define and listed in table below. Before compiling application for
117117
| Data | MODEL_BIT_DEPTH=8 | MODEL_BIT_DEPTH=816 | MODEL_BIT_DEPTH=16 |
118118
| :-----------------------------------------------: | :-------------------: | :-------------------: | :------------------: |
119119
| Weights <br/>(*.mli_model* section) | 18040 bytes | 17160 bytes | 34316 bytes |
120-
| Activations <br/>(*.Xdata* and *.Ydata* sections) | 29824 bytes | 18752 bytes | 18752 bytes |
121-
| Structures <br/>(*.mli_data* section) | 1540 bytes | 1220 bytes | 1220 bytes |
120+
| Activations <br/>(*.Xdata* and *.Ydata* sections) | 14880 bytes | 18752 bytes | 18752 bytes |
122121

123122
By default, application uses MODEL_BIT_DEPTH=16 mode. Application code size depends on target hardware configuration and compilation flags. MLI Library code is wrapped into mli_lib section.
124123

examples/example_har_smartphone/har_smartphone_model.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ mli_status har_smartphone_init();
7575

7676
// Use user-implemented LSTM as layer 3
7777
// If not defined - uses default mli lib lstm kernel
78-
//#define CUSTOM_USER_LSTM_LAYER3
78+
#define CUSTOM_USER_LSTM_LAYER3
7979

8080
#define MODEL_SA_8 (8)
8181
#define MODEL_FX_16 (16)

0 commit comments

Comments
 (0)