<p>In <a href="https://github.com/mlpack/mlpack/pull/696#discussion_r67211173">src/mlpack/methods/edge_boxes/feature_extraction_impl.hpp</a>:</p>
<pre style='color:#555'>> + //dis.elem( arma::find(dis >= g_rad) ).zeros();
> + //dis2.elem( arma::find(dis < g_rad) ).zeros();
> +
> +
> + arma::uvec pos_loc = arma::find( (dis < g_rad) % mask );
> + arma::uvec neg_loc = arma::find( (dis >= g_rad) % mask );
> +
> + pos_loc = arma::shuffle(pos_loc);
> + neg_loc = arma::shuffle(neg_loc);
> +
> + arma::umat loc(n_patches_per_gt * 2, 2);
> + //cout << "pos_loc size: " << arma::size(pos_loc) << " neg_loc size: " << arma::size(neg_loc) << endl;
> + //cout << "n_patches_per_gt = " << n_patches_per_gt << endl;
> + for(size_t i = 0; i < n_patches_per_gt; ++i)
> + {
> + loc.row(i) = arma::ind2sub(arma::size(dis.n_rows, dis.n_cols), pos_loc(i) ).t();
</pre>
<p>Do you think, we could store the location in the columns, in this case we don't have to transpose the locations vector.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67211173">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFAA1mJ2E1IrSheGWS23fO38fwx86ks5qMDvSgaJpZM4I1lnr">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFE3oQ17eP6evZQYBgP92OOOgqnR9ks5qMDvSgaJpZM4I1lnr.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/mlpack/mlpack/pull/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67211173"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>