Replace Report() with TF_LITE_REPORT_ERROR-macro.
This commit is contained in:
parent
8392598281
commit
31787df613
@ -36,7 +36,7 @@ TF_LITE_MICRO_TEST(TestImageRecognitionInvoke) {
|
||||
|
||||
const tflite::Model* model = ::tflite::GetModel(image_recognition_model_data);
|
||||
if (model->version() != TFLITE_SCHEMA_VERSION) {
|
||||
error_reporter->Report(
|
||||
TF_LITE_REPORT_ERROR(error_reporter,
|
||||
"Model provided is schema version %d not equal "
|
||||
"to supported version %d.\n",
|
||||
model->version(), TFLITE_SCHEMA_VERSION);
|
||||
@ -78,7 +78,7 @@ TF_LITE_MICRO_TEST(TestImageRecognitionInvoke) {
|
||||
TfLiteStatus invoke_status = interpreter.Invoke();
|
||||
TF_LITE_MICRO_EXPECT_EQ(kTfLiteOk, invoke_status);
|
||||
if (invoke_status != kTfLiteOk) {
|
||||
error_reporter->Report("Invoke failed\n");
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Invoke failed\n");
|
||||
}
|
||||
|
||||
TfLiteTensor* output = interpreter.output(0);
|
||||
|
@ -45,13 +45,13 @@ int main(int argc, char** argv) {
|
||||
tflite::ErrorReporter* error_reporter = µ_error_reporter;
|
||||
|
||||
if (InitCamera(error_reporter) != kTfLiteOk) {
|
||||
error_reporter->Report("Failed to init camera.");
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Failed to init camera.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const tflite::Model* model = ::tflite::GetModel(image_recognition_model_data);
|
||||
if (model->version() != TFLITE_SCHEMA_VERSION) {
|
||||
error_reporter->Report(
|
||||
TF_LITE_REPORT_ERROR(error_reporter,
|
||||
"Model provided is schema version %d not equal "
|
||||
"to supported version %d.",
|
||||
model->version(), TFLITE_SCHEMA_VERSION);
|
||||
@ -77,12 +77,12 @@ int main(int argc, char** argv) {
|
||||
input->data.uint8);
|
||||
|
||||
if (input->type != kTfLiteUInt8) {
|
||||
error_reporter->Report("Wrong input type.");
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Wrong input type.");
|
||||
}
|
||||
|
||||
TfLiteStatus invoke_status = interpreter.Invoke();
|
||||
if (invoke_status != kTfLiteOk) {
|
||||
error_reporter->Report("Invoke failed.");
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Invoke failed.");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ limitations under the License.
|
||||
|
||||
TfLiteStatus InitCamera(tflite::ErrorReporter* error_reporter) {
|
||||
if (BSP_CAMERA_Init(RESOLUTION_R160x120) != CAMERA_OK) {
|
||||
error_reporter->Report("Failed to init camera.\n");
|
||||
TF_LITE_REPORT_ERROR(error_reporter, "Failed to init camera.\n");
|
||||
return kTfLiteError;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user