diff options
author | Pablo Marquez <pablo.tello@arm.com> | 2019-02-15 09:51:03 +0000 |
---|---|---|
committer | Pablo Marquez <pablo.tello@arm.com> | 2019-02-15 11:22:08 +0000 |
commit | 5576315671cb357bcfc2d794e7f172ab4c633606 (patch) | |
tree | df14ca0597f4f719725dce92e6dfc4bd19fb6eae /tests/AssetsLibrary.h | |
parent | 6253897f809f4e7b21adb8e1bf64021873de5631 (diff) | |
download | ComputeLibrary-5576315671cb357bcfc2d794e7f172ab4c633606.tar.gz |
Revert "COMPMID-1766: Implemented CPP Non Max Suppression"
This reverts commit a0a0e29f635de08092c2325f8f049ffb286aabaf.
Change-Id: I2a2a37ba7531f93a1562748054a3c29573c9753f
Reviewed-on: https://review.mlplatform.org/705
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: VidhyaSudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Diffstat (limited to 'tests/AssetsLibrary.h')
-rw-r--r-- | tests/AssetsLibrary.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/AssetsLibrary.h b/tests/AssetsLibrary.h index 366c1450ba..d09e22762d 100644 --- a/tests/AssetsLibrary.h +++ b/tests/AssetsLibrary.h @@ -207,9 +207,6 @@ public: template <typename T, typename D> void fill(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const; - template <typename T, typename D> - void fill_boxes(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const; - /** Fills the specified @p raw tensor with random values drawn from @p * distribution. * @@ -485,40 +482,6 @@ void AssetsLibrary::fill_borders_with_garbage(T &&tensor, D &&distribution, std: } template <typename T, typename D> -void AssetsLibrary::fill_boxes(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const -{ - using ResultType = typename std::remove_reference<D>::type::result_type; - std::mt19937 gen(_seed + seed_offset); - TensorShape shape(tensor.shape()); - const int num_boxes = tensor.num_elements() / 4; - // Iterate over all elements - std::uniform_real_distribution<> size_dist(0.f, 1.f); - for(int element_idx = 0; element_idx < num_boxes * 4; element_idx += 4) - { - const ResultType delta = size_dist(gen); - const ResultType epsilon = size_dist(gen); - const ResultType left = distribution(gen); - const ResultType top = distribution(gen); - const ResultType right = left + delta; - const ResultType bottom = top + epsilon; - const std::tuple<ResultType, ResultType, ResultType, ResultType> box(left, top, right, bottom); - Coordinates x1 = index2coord(shape, element_idx); - Coordinates y1 = index2coord(shape, element_idx + 1); - Coordinates x2 = index2coord(shape, element_idx + 2); - Coordinates y2 = index2coord(shape, element_idx + 3); - ResultType &target_value_x1 = reinterpret_cast<ResultType *>(tensor(x1))[0]; - ResultType &target_value_y1 = reinterpret_cast<ResultType *>(tensor(y1))[0]; - ResultType &target_value_x2 = reinterpret_cast<ResultType *>(tensor(x2))[0]; - ResultType &target_value_y2 = reinterpret_cast<ResultType *>(tensor(y2))[0]; - store_value_with_data_type(&target_value_x1, std::get<0>(box), tensor.data_type()); - store_value_with_data_type(&target_value_y1, std::get<1>(box), tensor.data_type()); - store_value_with_data_type(&target_value_x2, std::get<2>(box), tensor.data_type()); - store_value_with_data_type(&target_value_y2, std::get<3>(box), tensor.data_type()); - } - fill_borders_with_garbage(tensor, distribution, seed_offset); -} - -template <typename T, typename D> void AssetsLibrary::fill(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const { using ResultType = typename std::remove_reference<D>::type::result_type; |