aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmark/fixtures/BatchNormalizationLayerFixture.h')
-rw-r--r--tests/benchmark/fixtures/BatchNormalizationLayerFixture.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h b/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
index c55bb2acc9..ae8f8a7af1 100644
--- a/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
+++ b/tests/benchmark/fixtures/BatchNormalizationLayerFixture.h
@@ -42,15 +42,19 @@ class BatchNormalizationLayerFixture : public framework::Fixture
{
public:
template <typename...>
- void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, bool use_gamma, bool use_beta, ActivationLayerInfo act_info, DataType data_type, int batches)
+ void setup(TensorShape tensor_shape, TensorShape param_shape, float epsilon, bool use_gamma, bool use_beta, ActivationLayerInfo act_info, DataType data_type, DataLayout data_layout, int batches)
{
// Set batched in source and destination shapes
const unsigned int fixed_point_position = 4;
tensor_shape.set(tensor_shape.num_dimensions(), batches);
+ if(data_layout == DataLayout::NHWC)
+ {
+ permute(tensor_shape, PermutationVector(2U, 0U, 1U));
+ }
// Create tensors
- src = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
- dst = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position);
+ src = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout);
+ dst = create_tensor<TensorType>(tensor_shape, data_type, 1, fixed_point_position, QuantizationInfo(), data_layout);
mean = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
variance = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);
beta = create_tensor<TensorType>(param_shape, data_type, 1, fixed_point_position);