From 5576315671cb357bcfc2d794e7f172ab4c633606 Mon Sep 17 00:00:00 2001 From: Pablo Marquez Date: Fri, 15 Feb 2019 09:51:03 +0000 Subject: 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 Reviewed-by: VidhyaSudhan Loganathan --- tests/AssetsLibrary.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'tests/AssetsLibrary.h') 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 void fill(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const; - template - 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. * @@ -484,40 +481,6 @@ void AssetsLibrary::fill_borders_with_garbage(T &&tensor, D &&distribution, std: }); } -template -void AssetsLibrary::fill_boxes(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const -{ - using ResultType = typename std::remove_reference::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 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(tensor(x1))[0]; - ResultType &target_value_y1 = reinterpret_cast(tensor(y1))[0]; - ResultType &target_value_x2 = reinterpret_cast(tensor(x2))[0]; - ResultType &target_value_y2 = reinterpret_cast(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 void AssetsLibrary::fill(T &&tensor, D &&distribution, std::random_device::result_type seed_offset) const { -- cgit v1.2.1