Skip to content

Commit 9e94c9d

Browse files
committed
Add model format check for tflite.
1 parent e2410e9 commit 9e94c9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/iwasm/libraries/wasi-nn/src/wasi_nn_tensorflowlite.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ load(void *tflite_ctx, graph_builder_array *builder, graph_encoding encoding,
141141
return invalid_argument;
142142
}
143143
if (memcmp(tfl_ctx->models[*g].model_pointer + 4, "TFL3", 4) != 0) {
144-
NN_ERR_PRINTF("Model file is not a TFLite FlatBuffer (missing TFL3 identifier).");
144+
NN_ERR_PRINTF("Model file is not a TFLite FlatBuffer (missing TFL3
145+
identifier).");
145146
return invalid_argument;
146147
}
147148

0 commit comments

Comments
 (0)