ArmNN
NotReleased
|
#include <armnn/Tensor.hpp>
#include <QuantizeHelper.hpp>
#include <boost/assert.hpp>
#include <boost/multi_array.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/random/uniform_real_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/test/unit_test.hpp>
#include <array>
#include <cmath>
#include <vector>
Go to the source code of this file.
Classes | |
struct | SelectiveComparer< T, isQuantized > |
struct | SelectiveComparer< T, false > |
Functions | |
template<typename T > | |
bool | SelectiveCompare (T a, T b) |
template<typename T > | |
bool | SelectiveCompareBoolean (T a, T b) |
template<typename T , std::size_t n> | |
boost::test_tools::predicate_result | CompareTensors (const boost::multi_array< T, n > &a, const boost::multi_array< T, n > &b, bool compareBoolean=false) |
template<typename T , std::size_t n> | |
boost::multi_array< T, n > | MakeTensor (const armnn::TensorInfo &tensorInfo) |
template<typename T , std::size_t n> | |
boost::multi_array< T, n > | MakeTensor (const armnn::TensorInfo &tensorInfo, const std::vector< T > &flat) |
template<typename T , std::size_t n> | |
boost::multi_array< T, n > | MakeRandomTensor (const armnn::TensorInfo &tensorInfo, unsigned int seed, float min=-10.0f, float max=10.0f) |
Variables | |
constexpr float | g_FloatCloseToZeroTolerance = 1.0e-6f |
boost::test_tools::predicate_result CompareTensors | ( | const boost::multi_array< T, n > & | a, |
const boost::multi_array< T, n > & | b, | ||
bool | compareBoolean = false |
||
) |
Definition at line 75 of file TensorHelpers.hpp.
References SelectiveCompare(), and SelectiveCompareBoolean().
Referenced by BOOST_AUTO_TEST_CASE(), CompareTestResultIfSupported(), DetectionPostProcessImpl(), ParserPrototxtFixture< armnnOnnxParser::IOnnxParser >::RunTest(), ParserFlatbuffersSerializeFixture::RunTest(), and ParserFlatbuffersFixture::RunTest().
boost::multi_array<T, n> MakeRandomTensor | ( | const armnn::TensorInfo & | tensorInfo, |
unsigned int | seed, | ||
float | min = -10.0f , |
||
float | max = 10.0f |
||
) |
Definition at line 223 of file TensorHelpers.hpp.
References TensorInfo::GetNumElements(), TensorInfo::GetQuantizationOffset(), and TensorInfo::GetQuantizationScale().
boost::multi_array<T, n> MakeTensor | ( | const armnn::TensorInfo & | tensorInfo | ) |
boost::multi_array<T, n> MakeTensor | ( | const armnn::TensorInfo & | tensorInfo, |
const std::vector< T > & | flat | ||
) |
Definition at line 193 of file TensorHelpers.hpp.
References TensorInfo::GetNumDimensions(), TensorInfo::GetNumElements(), and TensorInfo::GetShape().
bool SelectiveCompare | ( | T | a, |
T | b | ||
) |
Definition at line 63 of file TensorHelpers.hpp.
References SelectiveComparer< T, isQuantized >::Compare().
Referenced by CompareTensors().
bool SelectiveCompareBoolean | ( | T | a, |
T | b | ||
) |
Definition at line 69 of file TensorHelpers.hpp.
Referenced by CompareTensors().
constexpr float g_FloatCloseToZeroTolerance = 1.0e-6f |
Definition at line 23 of file TensorHelpers.hpp.
Referenced by SelectiveComparer< T, false >::Compare().