Fix benchmark to check for kTfLiteError in case of benchmarking a model which returns an abort code.
PiperOrigin-RevId: 357599200 Change-Id: I4deeb665912c12d164e405cc79f76512d95068be
This commit is contained in:
parent
709cd78c09
commit
72ceff2e12
@ -15,6 +15,9 @@ cc_library(
|
||||
hdrs = [
|
||||
"micro_benchmark.h",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/lite/micro:micro_error_reporter",
|
||||
"//tensorflow/lite/micro:micro_framework",
|
||||
|
@ -43,7 +43,7 @@ class MicroBenchmarkRunner {
|
||||
void RunSingleIteration() {
|
||||
// Run the model on this input and make sure it succeeds.
|
||||
TfLiteStatus invoke_status = interpreter_.Invoke();
|
||||
if (invoke_status != kTfLiteOk) {
|
||||
if (invoke_status == kTfLiteError) {
|
||||
MicroPrintf("Invoke failed.");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user