.target_devices = target_devices };
auto engine = std::make_unique<InferenceEngineCommon>();
- if (engine == nullptr) {
- ASSERT_TRUE(engine);
- return;
- }
+ ASSERT_TRUE(engine);
int ret = engine->EnableProfiler(true);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
if (backend_type == INFERENCE_BACKEND_ONE)
backend_name = "one";
ret = engine->DumpProfileToFile("profile_data_" + backend_name +
"_" + Target_Formats[target_devices] +
"_tflite_model.txt");
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->LoadConfigFile();
ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->BindBackend(&config);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_capacity capacity;
ret = engine->GetBackendCapacity(&capacity);
std::vector<std::string> models;
int model_type = GetModelInfo(model_paths, models);
- if (model_type == -1) {
- ASSERT_NE(model_type, -1);
- return;
- }
+ ASSERT_NE(model_type, -1);
inference_engine_layer_property input_property;
std::vector<std::string>::iterator iter;
}
ret = engine->SetInputLayerProperty(input_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_layer_property output_property;
}
ret = engine->SetOutputLayerProperty(output_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->Load(models, (inference_model_format_e) model_type);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
std::vector<inference_engine_tensor_buffer> inputs, outputs;
ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
// Copy input image tensor data from a given file to input tensor buffer.
for (int i = 0; i < (int) image_paths.size(); ++i) {
.target_devices = target_devices };
auto engine = std::make_unique<InferenceEngineCommon>();
- if (engine == nullptr) {
- ASSERT_TRUE(engine);
- return;
- }
+ ASSERT_TRUE(engine);
int ret = engine->EnableProfiler(true);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->DumpProfileToFile("profile_data_" + backend_name +
"_caffe_model.txt");
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->LoadConfigFile();
ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->BindBackend(&config);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_capacity capacity;
ret = engine->GetBackendCapacity(&capacity);
std::vector<std::string> models;
int model_type = GetModelInfo(model_paths, models);
- if (model_type == -1) {
- ASSERT_NE(model_type, -1);
- return;
- }
+ ASSERT_NE(model_type, -1);
inference_engine_layer_property input_property;
std::vector<std::string>::iterator iter;
}
ret = engine->SetInputLayerProperty(input_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_layer_property output_property;
}
ret = engine->SetOutputLayerProperty(output_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->Load(models, (inference_model_format_e) model_type);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
std::vector<inference_engine_tensor_buffer> inputs, outputs;
ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
// Copy input image tensor data from a given file to input tensor buffer.
for (int i = 0; i < (int) image_paths.size(); ++i) {
.target_devices = target_devices };
auto engine = std::make_unique<InferenceEngineCommon>();
- if (engine == nullptr) {
- ASSERT_TRUE(engine);
- return;
- }
+ ASSERT_TRUE(engine);
int ret = engine->EnableProfiler(true);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->DumpProfileToFile("profile_data_" + backend_name +
"_dldt_model.txt");
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->LoadConfigFile();
ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->BindBackend(&config);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_capacity capacity;
ret = engine->GetBackendCapacity(&capacity);
std::vector<std::string> models;
int model_type = GetModelInfo(model_paths, models);
- if (model_type == -1) {
- ASSERT_NE(model_type, -1);
- return;
- }
+ ASSERT_NE(model_type, -1);
inference_engine_layer_property input_property;
std::vector<std::string>::iterator iter;
}
ret = engine->SetInputLayerProperty(input_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_layer_property output_property;
}
ret = engine->SetOutputLayerProperty(output_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->Load(models, (inference_model_format_e) model_type);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
std::vector<inference_engine_tensor_buffer> inputs, outputs;
ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
// Copy input image tensor data from a given file to input tensor buffer.
for (int i = 0; i < (int) image_paths.size(); ++i) {
std::vector<std::string> models;
int model_type = GetModelInfo(model_paths, models);
- if (model_type == -1) {
- ASSERT_NE(model_type, -1);
- return;
- }
+ ASSERT_NE(model_type, -1);
ret = engine->Load(models, (inference_model_format_e) model_type);
EXPECT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
std::cout << "backend = " << backend_name << std::endl;
auto engine = std::make_unique<InferenceEngineCommon>();
- if (engine == nullptr) {
- ASSERT_TRUE(engine);
- return;
- }
+ ASSERT_TRUE(engine);
if (profiler > INFERENCE_ENGINE_PROFILER_OFF &&
profiler < INFERENCE_ENGINE_PROFILER_MAX) {
std::vector<std::string> models;
int model_type = GetModelInfo(model_paths, models);
- if (model_type == -1) {
- ASSERT_NE(model_type, -1);
- return;
- }
+ ASSERT_NE(model_type, -1);
inference_engine_layer_property input_property;
std::vector<std::string>::iterator iter;
}
ret = engine->SetInputLayerProperty(input_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
inference_engine_layer_property output_property;
}
ret = engine->SetOutputLayerProperty(output_property);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
ret = engine->Load(models, (inference_model_format_e) model_type);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
std::vector<inference_engine_tensor_buffer> inputs, outputs;
ret = PrepareTensorBuffers(engine.get(), inputs, outputs);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
- return;
- }
+ ASSERT_EQ(ret, INFERENCE_ENGINE_ERROR_NONE);
// Copy input image tensor data from a given file to input tensor buffer.
for (int i = 0; i < (int) image_paths.size(); ++i) {