[mlpack-git] [mlpack/mlpack] Added the discretize function. Design changes as discussed. (#703)

Marcus Edel notifications at github.com
Sun Aug 14 11:50:44 EDT 2016


> +
> +  CubeType PDist(CubeType& features, arma::uvec& grid_pos);
> +  ***-/
> +*/
> +
> +BOOST_AUTO_TEST_SUITE(EdgeBoxesTest);
> +
> +/**
> + * This test checks the feature extraction functions 
> + * mentioned in feature_extraction.hpp
> + */
> +
> +void Test(arma::mat m1, arma::mat m2)
> +{
> +  for (size_t i = 0; i < m1.n_cols; ++i)
> +    BOOST_REQUIRE_CLOSE(m1(i), m2(i), 1e-2);  

That only compares the first (n_cols) elements. I think you like to use n_elem. Also you could use a template parameter for the mat type and just write a single function for cube and mat.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/703/files/72eb1ef22c7db1ea33af3de1cd043cdb277ec562#r74704141
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160814/a1099793/attachment.html>


More information about the mlpack-git mailing list