ArmNN
 21.08
ActivationFixture.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "TensorCopyUtils.hpp"
8 #include "WorkloadTestUtils.hpp"
9 
11 
12 #include <test/TensorHelpers.hpp>
13 
15 {
17  {
18  output.resize(batchSize * channels * height * width);
19  outputExpected.resize(batchSize * channels * height * width);
20  input.resize(batchSize * channels * height * width);
21 
22  unsigned int inputShape[] = { batchSize, channels, height, width };
23  unsigned int outputShape[] = { batchSize, channels, height, width };
24 
27 
28  input = MakeRandomTensor<float>(inputTensorInfo, 21453);
29  }
30 
31  unsigned int width = 17;
32  unsigned int height = 29;
33  unsigned int channels = 2;
34  unsigned int batchSize = 5;
35 
36  std::vector<float> output;
37  std::vector<float> outputExpected;
38  std::vector<float> input;
39 
42 
43  // Parameters used by some of the activation functions.
44  float a = 0.234f;
45  float b = -12.345f;
46 };
47 
48 
50 {
52  {
53  input = MakeRandomTensor<float>(inputTensorInfo, 2342423, 0.0f, 1.0f);
54  }
55 };
std::vector< float > input
armnn::TensorInfo outputTensorInfo
armnn::TensorInfo inputTensorInfo
std::vector< float > output
std::vector< float > outputExpected