Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

point fix the vector declaration in MultiBoxDetection #15300

Merged
merged 4 commits into from
Jun 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/operator/contrib/multibox_detection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down