[mlpack-git] [mlpack/mlpack] edge_boxes: feature extraction updated, tests added (#696)
Marcus Edel
notifications at github.com
Wed Jun 15 11:45:00 EDT 2016
> +/**
> + * 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);
> +}
> +
> +void Test(arma::cube m1, arma::cube 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/696/files/b38b688edfc4c2ee8bf461240f8384a70575d3a4#r67187858
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160615/89154ee4/attachment-0001.html>
More information about the mlpack-git
mailing list