[ IE ] ExperimentalDetectron shape infer fix (#2143)
authorEvgenya Stepyreva <evgenya.stepyreva@intel.com>
Wed, 9 Sep 2020 15:25:53 +0000 (18:25 +0300)
committerGitHub <noreply@github.com>
Wed, 9 Sep 2020 15:25:53 +0000 (18:25 +0300)
inference-engine/src/legacy_api/src/shape_infer/built-in/ie_proposal_onnx_shape_infer.hpp
inference-engine/src/legacy_api/src/shape_infer/built-in/ie_topkrois_onnx_shape_infer.hpp

index d2f8836..15719d0 100644 (file)
@@ -29,8 +29,7 @@ public:
         cnnLayer.type = _type;
         validate(&cnnLayer, inBlobs, params, blobs);
 
-        size_t post_nms_count = static_cast<size_t>(cnnLayer.GetParamAsInt("post_nms_count"));
-
+        auto post_nms_count = cnnLayer.GetParamAsUInt("post_nms_count");
         outShapes.push_back({post_nms_count, 4});
         outShapes.push_back({post_nms_count, });
     }
index 35891b6..7b476ee 100644 (file)
@@ -32,7 +32,7 @@ public:
         cnnLayer.type = _type;
         validate(&cnnLayer, inBlobs, params, blobs);
 
-        const bool max_rois = cnnLayer.GetParamAsInt("max_rois");
+        const auto max_rois = cnnLayer.GetParamAsUInt("max_rois");
         outShapes.push_back({max_rois, 4});
     }
 };