From 87819b2138be67b58044e3adaeca9621b4125343 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Tue, 25 Aug 2020 17:18:16 +0900 Subject: [PATCH] Check tensor data type correctly Change-Id: I47a65126b6a5532477cd7b3fd2b30dc2f1153348 Signed-off-by: Inki Dae --- src/inference_engine_common_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 367ff7c..d27be80 100644 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -110,8 +110,8 @@ namespace Common return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER; } - if (tensor_info.data_type < INFERENCE_TENSOR_DATA_TYPE_FLOAT16 || - tensor_info.data_type > INFERENCE_TENSOR_DATA_TYPE_UINT32) { + if (tensor_info.data_type <= INFERENCE_TENSOR_DATA_TYPE_NONE || + tensor_info.data_type >= INFERENCE_TENSOR_DATA_TYPE_MAX) { LOGE("tensor data type is invalid."); return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER; } -- 2.34.1