diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-06-30 12:48:43 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | 94450f1fc91a89778354c2e1c07a328ba86d9cfc (patch) | |
tree | 9a84b1b86f5361027492b6698ea946d2e321baba /tests/validation/NEON/BatchNormalizationLayer.cpp | |
parent | d4f8c27f08c968f608a9e0e9b88df1871f62cdd3 (diff) | |
download | ComputeLibrary-94450f1fc91a89778354c2e1c07a328ba86d9cfc.tar.gz |
COMPMID-417: Use a common create_tensor function
Change-Id: I6b0511484a5b433ebec3fd62d778e64dcb4f89b5
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79362
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/NEON/BatchNormalizationLayer.cpp')
-rw-r--r-- | tests/validation/NEON/BatchNormalizationLayer.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/validation/NEON/BatchNormalizationLayer.cpp b/tests/validation/NEON/BatchNormalizationLayer.cpp index 7656b2f392..3206b3965d 100644 --- a/tests/validation/NEON/BatchNormalizationLayer.cpp +++ b/tests/validation/NEON/BatchNormalizationLayer.cpp @@ -21,10 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "NEON/Helper.h" #include "NEON/NEAccessor.h" #include "TypePrinter.h" #include "dataset/BatchNormalizationLayerDataset.h" +#include "tests/Globals.h" +#include "tests/Utils.h" #include "tests/validation/Helpers.h" #include "validation/Datasets.h" #include "validation/Reference.h" @@ -55,12 +56,12 @@ const float tolerance_q = 3; /**< Tolerance value for comparing reference's Tensor compute_reference_batch_normalization_layer(const TensorShape &shape0, const TensorShape &shape1, DataType dt, float epsilon, int fixed_point_position = 0) { // Create tensors - Tensor src = create_tensor(shape0, dt, 1, fixed_point_position); - Tensor dst = create_tensor(shape0, dt, 1, fixed_point_position); - Tensor mean = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor var = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor beta = create_tensor(shape1, dt, 1, fixed_point_position); - Tensor gamma = create_tensor(shape1, dt, 1, fixed_point_position); + Tensor src = create_tensor<Tensor>(shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor<Tensor>(shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor<Tensor>(shape1, dt, 1, fixed_point_position); // Create and configure function NEBatchNormalizationLayer norm; @@ -127,12 +128,12 @@ BOOST_DATA_TEST_CASE(Configuration, RandomBatchNormalizationLayerDataset() * (bo int fixed_point_position = (arm_compute::is_data_type_fixed_point(dt)) ? 3 : 0; // Create tensors - Tensor src = create_tensor(obj.shape0, dt, 1, fixed_point_position); - Tensor dst = create_tensor(obj.shape0, dt, 1, fixed_point_position); - Tensor mean = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor var = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor beta = create_tensor(obj.shape1, dt, 1, fixed_point_position); - Tensor gamma = create_tensor(obj.shape1, dt, 1, fixed_point_position); + Tensor src = create_tensor<Tensor>(obj.shape0, dt, 1, fixed_point_position); + Tensor dst = create_tensor<Tensor>(obj.shape0, dt, 1, fixed_point_position); + Tensor mean = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor var = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor beta = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); + Tensor gamma = create_tensor<Tensor>(obj.shape1, dt, 1, fixed_point_position); BOOST_TEST(src.info()->is_resizable()); BOOST_TEST(dst.info()->is_resizable()); |