aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/Reference.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-06-21 16:44:24 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit7b7858df42fccefbe6eb086ad516d5c011becd07 (patch)
tree92d8671160cd440647b6ee8aa7f949cf9896f6bb /tests/validation/Reference.cpp
parentd0ae8b8ac8a371fd552c46d4b3be3db8628a5ade (diff)
downloadComputeLibrary-7b7858df42fccefbe6eb086ad516d5c011becd07.tar.gz
COMPMID-359: Implement NEON ROIPoolingLayer
Change-Id: Ibffa738d4016d7221968bd43a4e6e1dab85baee8 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78623 Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/Reference.cpp')
-rw-r--r--tests/validation/Reference.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp
index 761bc20ea1..2388fb6fe3 100644
--- a/tests/validation/Reference.cpp
+++ b/tests/validation/Reference.cpp
@@ -30,6 +30,7 @@
#include "validation/Helpers.h"
#include <random>
+#include <vector>
using namespace arm_compute::test;
@@ -620,6 +621,28 @@ RawTensor Reference::compute_reference_pooling_layer(const TensorShape &shape_in
return ref_dst;
}
+RawTensor Reference::compute_reference_roi_pooling_layer(const TensorShape &shape, DataType dt, const std::vector<ROI> &rois, const ROIPoolingLayerInfo &pool_info)
+{
+ TensorShape shape_dst;
+ shape_dst.set(0, pool_info.pooled_width());
+ shape_dst.set(1, pool_info.pooled_height());
+ shape_dst.set(2, shape.z());
+ shape_dst.set(3, rois.size());
+
+ // Create reference
+ RawTensor ref_src = library->get(shape, dt);
+ RawTensor ref_dst = library->get(shape_dst, dt);
+
+ // Fill reference
+ std::uniform_real_distribution<> distribution(-1, 1);
+ library->fill(ref_src, distribution, 0.0);
+
+ // Compute reference
+ ReferenceCPP::roi_pooling_layer(ref_src, ref_dst, rois, pool_info);
+
+ return ref_dst;
+}
+
RawTensor Reference::compute_reference_softmax_layer(const TensorShape &shape, DataType dt, int fixed_point_position)
{
// Create reference