return ConvertEngineErrorToVisionError(ret);
}
+ ret = mBackend->GetInputLayerProperty(mInputLayerProperty);
+ if (ret != INFERENCE_ENGINE_ERROR_NONE) {
+ LOGE("Fail to get input layer property from backend engine.");
+ return ConvertEngineErrorToVisionError(ret);
+ }
+
// If the backend engine isn't able to allocate input tensor buffers internally,
// then allocate the buffers at here.
if (mInputTensorBuffers.empty()) {
- // Get input tensor information from backend to allocate input tensor buffers.
- ret = mBackend->GetInputLayerProperty(mInputLayerProperty);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- LOGE("Fail to get input layer property from backend engine.");
- return ConvertEngineErrorToVisionError(ret);
- }
-
for (int i = 0; i < mInputLayerProperty.tensor_infos.size(); ++i) {
inference_engine_tensor_info tensor_info = mInputLayerProperty.tensor_infos[i];
inference_engine_tensor_buffer tensor_buffer;
return ConvertEngineErrorToVisionError(ret);
}
+ ret = mBackend->GetOutputLayerProperty(mOutputLayerProperty);
+ if (ret != INFERENCE_ENGINE_ERROR_NONE) {
+ LOGE("Fail to get output layer property from backend engine.");
+ return ConvertEngineErrorToVisionError(ret);
+ }
+
// If the backend engine isn't able to allocate output tensor buffers internally,
// then allocate the buffers at here.
if (mOutputTensorBuffers.empty()) {
- // Get output tensor information from backend to allocate output tensor buffers.
- ret = mBackend->GetOutputLayerProperty(mOutputLayerProperty);
- if (ret != INFERENCE_ENGINE_ERROR_NONE) {
- LOGE("Fail to get output layer property from backend engine.");
- return ConvertEngineErrorToVisionError(ret);
- }
-
for (int i = 0; i < mOutputLayerProperty.tensor_infos.size(); ++i) {
inference_engine_tensor_info tensor_info = mOutputLayerProperty.tensor_infos[i];
inference_engine_tensor_buffer tensor_buffer;