You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ta...@apache.org on 2019/06/29 07:06:40 UTC
[incubator-mxnet] branch master updated: point fix the vector
declaration in MultiBoxDetection (#15300)
This is an automated email from the ASF dual-hosted git repository.
taolv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 06df38c point fix the vector declaration in MultiBoxDetection (#15300)
06df38c is described below
commit 06df38c5e6582be119879b0988b3c90d5e2b76b2
Author: Zhennan Qin <zh...@intel.com>
AuthorDate: Sat Jun 29 15:06:04 2019 +0800
point fix the vector declaration in MultiBoxDetection (#15300)
* point fix the vector declaration in MultiBoxDetection
* Rerun ci
* run ci
* CI
---
src/operator/contrib/multibox_detection.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/operator/contrib/multibox_detection.cc b/src/operator/contrib/multibox_detection.cc
index 65fe5f1..37bb5a5 100644
--- a/src/operator/contrib/multibox_detection.cc
+++ b/src/operator/contrib/multibox_detection.cc
@@ -98,8 +98,7 @@ inline void MultiBoxDetectionForward(const Tensor<cpu, 3, DType> &out,
const DType *p_anchor = anchors.dptr_;
const int omp_threads = mxnet::engine::OpenMP::Get()->GetRecommendedOMPThreadCount();
- std::vector<DType> outputs;
- outputs.reserve(num_anchors * 6);
+ std::vector<DType> outputs(num_anchors * 6);
for (int nbatch = 0; nbatch < num_batches; ++nbatch) {
const DType *p_cls_prob = cls_prob.dptr_ + nbatch * num_classes * num_anchors;
const DType *p_loc_pred = loc_pred.dptr_ + nbatch * num_anchors * 4;