ArmNN
 22.08
LayerTestResult.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/Tensor.hpp>
10 
11 #include <cstddef>
12 #include <vector>
13 
14 template <typename T, std::size_t n>
16 {
18  : m_Supported(true)
19  , m_CompareBoolean(false)
20  {
21  m_ActualData.reserve(outputInfo.GetNumElements());
22  m_ExpectedData.reserve(outputInfo.GetNumElements());
23  m_ActualShape = outputInfo.GetShape();
24  m_ExpectedShape = outputInfo.GetShape();
25  }
26 
27  LayerTestResult(const std::vector<T>& actualData,
28  const std::vector<T>& expectedData,
29  const armnn::TensorShape& actualShape,
30  const armnn::TensorShape& expectedShape)
31  : m_ActualData(actualData)
32  , m_ExpectedData(expectedData)
33  , m_ActualShape(actualShape)
34  , m_ExpectedShape(expectedShape)
35  , m_Supported(true)
36  , m_CompareBoolean(false)
37  {}
38 
39  LayerTestResult(const std::vector<T>& actualData,
40  const std::vector<T>& expectedData,
41  const armnn::TensorShape& actualShape,
42  const armnn::TensorShape& expectedShape,
43  const bool compareBoolean)
44  : m_ActualData(actualData)
45  , m_ExpectedData(expectedData)
46  , m_ActualShape(actualShape)
47  , m_ExpectedShape(expectedShape)
48  , m_Supported(true)
49  , m_CompareBoolean(compareBoolean)
50  {}
51 
52  std::vector<T> m_ActualData;
53  std::vector<T> m_ExpectedData;
56 
59 };
60 
61 
62 
63 
armnn::TensorShape m_ExpectedShape
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
LayerTestResult(const armnn::TensorInfo &outputInfo)
LayerTestResult(const std::vector< T > &actualData, const std::vector< T > &expectedData, const armnn::TensorShape &actualShape, const armnn::TensorShape &expectedShape)
LayerTestResult(const std::vector< T > &actualData, const std::vector< T > &expectedData, const armnn::TensorShape &actualShape, const armnn::TensorShape &expectedShape, const bool compareBoolean)
std::vector< T > m_ExpectedData
std::vector< T > m_ActualData
armnn::TensorShape m_ActualShape
unsigned int GetNumElements() const
Definition: Tensor.hpp:196