diff options
Diffstat (limited to 'tests/validation/fixtures/ActivationLayerFixture.h')
-rw-r--r-- | tests/validation/fixtures/ActivationLayerFixture.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/validation/fixtures/ActivationLayerFixture.h b/tests/validation/fixtures/ActivationLayerFixture.h index 8fa74979a8..f6d43ddd89 100644 --- a/tests/validation/fixtures/ActivationLayerFixture.h +++ b/tests/validation/fixtures/ActivationLayerFixture.h @@ -29,9 +29,9 @@ #include "tests/AssetsLibrary.h" #include "tests/Globals.h" #include "tests/IAccessor.h" -#include "tests/ParametersLibrary.h" #include "tests/framework/Asserts.h" #include "tests/framework/Fixture.h" +#include "tests/framework/ParametersLibrary.h" #include "tests/validation/Helpers.h" #include "tests/validation/reference/ActivationLayer.h" @@ -47,6 +47,11 @@ template <typename TensorType, typename AccessorType, typename FunctionType, typ class ActivationValidationGenericFixture : public framework::Fixture { public: + ActivationValidationGenericFixture() + : _target(parameters->get_ctx<TensorType>()) + { + } + template <typename...> void setup(TensorShape shape, bool in_place, ActivationLayerInfo::ActivationFunction function, float alpha_beta, DataType data_type, QuantizationInfo quantization_info) { @@ -90,12 +95,13 @@ protected: TensorType compute_target(const TensorShape &shape, ActivationLayerInfo info) { + auto ctx = parameters->get_ctx<TensorType>(); // Create tensors - TensorType src = create_tensor<TensorType>(shape, _data_type, 1, _input_quantization_info); - TensorType dst = create_tensor<TensorType>(shape, _data_type, 1, _output_quantization_info); + TensorType src = create_tensor<TensorType>(shape, _data_type, 1, _input_quantization_info, DataLayout::NCHW, ctx); + TensorType dst = create_tensor<TensorType>(shape, _data_type, 1, _output_quantization_info, DataLayout::NCHW, ctx); // Create and configure function - FunctionType act_layer(parameters->get_ctx<TensorType>()); + FunctionType act_layer(ctx); TensorType *dst_ptr = _in_place ? nullptr : &dst; |