[CPU] fix coverity issue in multiclass and a bug in matrix_nms (#17180)
* fix coverity issue in multiclass_nms Signed-off-by: Hu Yuan2 <yuan2.hu@intel.com> * fix issue in matrix_nms.cpp Signed-off-by: Hu Yuan2 <yuan2.hu@intel.com> --------- Signed-off-by: Hu Yuan2 <yuan2.hu@intel.com>
This commit is contained in:
@@ -376,7 +376,7 @@ void MatrixNms::execute(dnnl::stream strm) {
|
||||
|
||||
// NMS-alike nodes are always transformed to NMSIEInternal node in case of legacy api, for compatibility.
|
||||
// And on the other hand in case of api 2.0, keep them internal dynamic for better performance and functionality.
|
||||
if (isDynamicNode()) {
|
||||
if (!m_outStaticShape) {
|
||||
size_t totalBox = std::accumulate(m_numPerBatch.begin(), m_numPerBatch.end(), size_t(0));
|
||||
redefineOutputMemory({{totalBox, 6}, {totalBox, 1}, {m_numBatches}});
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ void MultiClassNms::prepareParams() {
|
||||
} else {
|
||||
m_numBatches = boxes_dims[0];
|
||||
}
|
||||
m_numBoxes = shared ? boxes_dims[1] : boxes_dims[1];
|
||||
m_numBoxes = boxes_dims[1];
|
||||
m_numClasses = shared ? scores_dims[1] : scores_dims[0];
|
||||
|
||||
int max_output_boxes_per_class = 0;
|
||||
|
||||
Reference in New Issue
Block a user