From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_reshape_test_impl_8hpp.xhtml | 200 ++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 20.02/_reshape_test_impl_8hpp.xhtml (limited to '20.02/_reshape_test_impl_8hpp.xhtml') diff --git a/20.02/_reshape_test_impl_8hpp.xhtml b/20.02/_reshape_test_impl_8hpp.xhtml new file mode 100644 index 0000000000..b42f8f3c6b --- /dev/null +++ b/20.02/_reshape_test_impl_8hpp.xhtml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + +ArmNN: src/backends/backendsCommon/test/layerTests/ReshapeTestImpl.hpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
ReshapeTestImpl.hpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + + + + +

+Functions

template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 4 > SimpleReshapeTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>>
LayerTestResult< T, 5 > Reshape5dTest (armnn::IWorkloadFactory &workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr &memoryManager)
 
+

Function Documentation

+ +

◆ Reshape5dTest()

+ +
+
+ + + + + + + + + + + + + + + + + + +
LayerTestResult<T, 5> Reshape5dTest (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager 
)
+
+ +

Definition at line 109 of file ReshapeTestImpl.cpp.

+ +

References TensorInfo::SetQuantizationScale().

+
112 {
113  armnn::TensorInfo inputTensorInfo;
114  armnn::TensorInfo outputTensorInfo;
115 
116  unsigned int inputShape[] = { 2, 2, 8, 1, 1 };
117  unsigned int outputShape[] = { 2, 2, 2, 2, 2 };
118 
119  inputTensorInfo = armnn::TensorInfo(5, inputShape, ArmnnType);
120  inputTensorInfo.SetQuantizationScale(1.0f);
121  outputTensorInfo = armnn::TensorInfo(5, outputShape, ArmnnType);
122  outputTensorInfo.SetQuantizationScale(1.0f);
123 
124  auto input = ConvertToDataType<ArmnnType>(
125  {
126  0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f,
127  8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f,
128 
129  16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f,
130  24.0f, 25.0f, 26.0f, 27.0f, 28.0f, 29.0f, 30.0f, 31.0f,
131  },
132  inputTensorInfo);
133 
134  auto outputExpected = ConvertToDataType<ArmnnType>(
135  {
136  0.0f, 1.0f,
137  2.0f, 3.0f,
138 
139  4.0f, 5.0f,
140  6.0f, 7.0f,
141 
142 
143  8.0f, 9.0f,
144  10.0f, 11.0f,
145 
146  12.0f, 13.0f,
147  14.0f, 15.0f,
148 
149 
150 
151  16.0f, 17.0f,
152  18.0f, 19.0f,
153 
154  20.0f, 21.0f,
155  22.0f, 23.0f,
156 
157 
158  24.0f, 25.0f,
159  26.0f, 27.0f,
160 
161  28.0f, 29.0f,
162  30.0f, 31.0f,
163  },
164  outputTensorInfo);
165 
166  return SimpleReshapeTestImpl<T, 5>(
167  workloadFactory, memoryManager, inputTensorInfo, outputTensorInfo, input, outputExpected);
168 }
+
void SetQuantizationScale(float scale)
Definition: Tensor.cpp:259
+
+
+
+ +

◆ SimpleReshapeTest()

+ +
+
+ + + + + + + + + + + + + + + + + + +
LayerTestResult<T, 4> SimpleReshapeTest (armnn::IWorkloadFactoryworkloadFactory,
const armnn::IBackendInternal::IMemoryManagerSharedPtrmemoryManager 
)
+
+ +

Definition at line 57 of file ReshapeTestImpl.cpp.

+ +

References TensorInfo::SetQuantizationScale().

+
60 {
61  armnn::TensorInfo inputTensorInfo;
62  armnn::TensorInfo outputTensorInfo;
63 
64  unsigned int inputShape[] = { 2, 2, 3, 3 };
65  unsigned int outputShape[] = { 2, 2, 9, 1 };
66 
67  inputTensorInfo = armnn::TensorInfo(4, inputShape, ArmnnType);
68  inputTensorInfo.SetQuantizationScale(1.0f);
69  outputTensorInfo = armnn::TensorInfo(4, outputShape, ArmnnType);
70  outputTensorInfo.SetQuantizationScale(1.0f);
71 
72  auto input = ConvertToDataType<ArmnnType>(
73  {
74  0.0f, 1.0f, 2.0f,
75  3.0f, 4.0f, 5.0f,
76  6.0f, 7.0f, 8.0f,
77 
78  9.0f, 10.0f, 11.0f,
79  12.0f, 13.0f, 14.0f,
80  15.0f, 16.0f, 17.0f,
81 
82  18.0f, 19.0f, 20.0f,
83  21.0f, 22.0f, 23.0f,
84  24.0f, 25.0f, 26.0f,
85 
86  27.0f, 28.0f, 29.0f,
87  30.0f, 31.0f, 32.0f,
88  33.0f, 34.0f, 35.0f,
89  },
90  inputTensorInfo);
91 
92  auto outputExpected = ConvertToDataType<ArmnnType>(
93  {
94  0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f,
95 
96  9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f,
97 
98  18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f, 25.0f, 26.0f,
99 
100  27.0f, 28.0f, 29.0f, 30.0f, 31.0f, 32.0f, 33.0f, 34.0f, 35.0f,
101  },
102  outputTensorInfo);
103 
104  return SimpleReshapeTestImpl<T, 4>(
105  workloadFactory, memoryManager, inputTensorInfo, outputTensorInfo, input, outputExpected);
106 }
+
void SetQuantizationScale(float scale)
Definition: Tensor.cpp:259
+
+
+
+
+
+ + + + -- cgit v1.2.1