20.02
|
#include <ParserFlatbuffersFixture.hpp>
Public Member Functions | |
ParserFlatbuffersFixture () | |
void | Setup () |
void | SetupSingleInputSingleOutput (const std::string &inputName, const std::string &outputName) |
bool | ReadStringToBinary () |
template<std::size_t NumOutputDimensions, armnn::DataType ArmnnType> | |
void | RunTest (size_t subgraphId, const std::vector< armnn::ResolveType< ArmnnType >> &inputData, const std::vector< armnn::ResolveType< ArmnnType >> &expectedOutputData) |
Executes the network with the given input tensor and checks the result against the given output tensor. More... | |
template<std::size_t NumOutputDimensions, armnn::DataType ArmnnType> | |
void | RunTest (size_t subgraphId, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType >>> &inputData, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType >>> &expectedOutputData) |
Executes the network with the given input tensors and checks the results against the given output tensors. More... | |
template<std::size_t NumOutputDimensions, armnn::DataType ArmnnType1, armnn::DataType ArmnnType2> | |
void | RunTest (size_t subgraphId, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType1 >>> &inputData, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType2 >>> &expectedOutputData) |
Multiple Inputs, Multiple Outputs w/ Variable Datatypes and different dimension sizes. More... | |
template<armnn::DataType ArmnnType1, armnn::DataType ArmnnType2> | |
void | RunTest (std::size_t subgraphId, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType1 >>> &inputData, const std::map< std::string, std::vector< armnn::ResolveType< ArmnnType2 >>> &expectedOutputData) |
Multiple Inputs, Multiple Outputs w/ Variable Datatypes and different dimension sizes. More... | |
void | CheckTensors (const TensorRawPtr &tensors, size_t shapeSize, const std::vector< int32_t > &shape, tflite::TensorType tensorType, uint32_t buffer, const std::string &name, const std::vector< float > &min, const std::vector< float > &max, const std::vector< float > &scale, const std::vector< int64_t > &zeroPoint) |
Static Public Member Functions | |
static std::string | GenerateDetectionPostProcessJsonString (const armnn::DetectionPostProcessDescriptor &descriptor) |
Public Attributes | |
std::vector< uint8_t > | m_GraphBinary |
std::string | m_JsonString |
ITfLiteParserPtr | m_Parser |
armnn::IRuntimePtr | m_Runtime |
armnn::NetworkId | m_NetworkIdentifier |
std::string | m_SingleInputName |
If the single-input-single-output overload of Setup() is called, these will store the input and output name so they don't need to be passed to the single-input-single-output overload of RunTest(). More... | |
std::string | m_SingleOutputName |
Definition at line 37 of file ParserFlatbuffersFixture.hpp.
|
inline |
Definition at line 39 of file ParserFlatbuffersFixture.hpp.
References m_Parser, and options.
|
inline |
Definition at line 193 of file ParserFlatbuffersFixture.hpp.
References BOOST_CHECK().
|
inlinestatic |
Definition at line 166 of file ParserFlatbuffersFixture.hpp.
References DetectionPostProcessDescriptor::m_DetectionsPerClass, DetectionPostProcessDescriptor::m_MaxClassesPerDetection, DetectionPostProcessDescriptor::m_MaxDetections, DetectionPostProcessDescriptor::m_NmsIouThreshold, DetectionPostProcessDescriptor::m_NmsScoreThreshold, DetectionPostProcessDescriptor::m_NumClasses, DetectionPostProcessDescriptor::m_ScaleH, DetectionPostProcessDescriptor::m_ScaleW, DetectionPostProcessDescriptor::m_ScaleX, DetectionPostProcessDescriptor::m_ScaleY, and DetectionPostProcessDescriptor::m_UseRegularNms.
|
inline |
Definition at line 102 of file ParserFlatbuffersFixture.hpp.
References g_TfLiteSchemaText, g_TfLiteSchemaText_len, and RunTest().
Referenced by Setup().
void RunTest | ( | size_t | subgraphId, |
const std::vector< armnn::ResolveType< armnnType >> & | inputData, | ||
const std::vector< armnn::ResolveType< armnnType >> & | expectedOutputData | ||
) |
Executes the network with the given input tensor and checks the result against the given output tensor.
Single Input, Single Output Executes the network with the given input tensor and checks the result against the given output tensor.
This assumes the network has a single input and a single output.
This overload assumes the network has a single input and a single output.
Definition at line 222 of file ParserFlatbuffersFixture.hpp.
References m_SingleInputName, and m_SingleOutputName.
Referenced by ReadStringToBinary().
void RunTest | ( | size_t | subgraphId, |
const std::map< std::string, std::vector< armnn::ResolveType< armnnType >>> & | inputData, | ||
const std::map< std::string, std::vector< armnn::ResolveType< armnnType >>> & | expectedOutputData | ||
) |
Executes the network with the given input tensors and checks the results against the given output tensors.
Multiple Inputs, Multiple Outputs Executes the network with the given input tensors and checks the results against the given output tensors.
This overload supports multiple inputs and multiple outputs, identified by name.
Definition at line 236 of file ParserFlatbuffersFixture.hpp.
void RunTest | ( | size_t | subgraphId, |
const std::map< std::string, std::vector< armnn::ResolveType< armnnType1 >>> & | inputData, | ||
const std::map< std::string, std::vector< armnn::ResolveType< armnnType2 >>> & | expectedOutputData | ||
) |
Multiple Inputs, Multiple Outputs w/ Variable Datatypes and different dimension sizes.
Multiple Inputs, Multiple Outputs w/ Variable Datatypes Executes the network with the given input tensors and checks the results against the given output tensors.
Executes the network with the given input tensors and checks the results against the given output tensors. This overload supports multiple inputs and multiple outputs, identified by name along with the allowance for the input datatype to be different to the output
This overload supports multiple inputs and multiple outputs, identified by name along with the allowance for the input datatype to be different to the output
Definition at line 250 of file ParserFlatbuffersFixture.hpp.
References CompareTensors(), TensorInfo::GetNumDimensions(), m_NetworkIdentifier, m_Parser, m_Runtime, and armnn::VerifyTensorInfoDataType().
void RunTest | ( | std::size_t | subgraphId, |
const std::map< std::string, std::vector< armnn::ResolveType< armnnType1 >>> & | inputData, | ||
const std::map< std::string, std::vector< armnn::ResolveType< armnnType2 >>> & | expectedOutputData | ||
) |
Multiple Inputs, Multiple Outputs w/ Variable Datatypes and different dimension sizes.
Executes the network with the given input tensors and checks the results against the given output tensors. This overload supports multiple inputs and multiple outputs, identified by name along with the allowance for the input datatype to be different to the output
Executes the network with the given input tensors and checks the results against the given output tensors. This overload supports multiple inputs and multiple outputs, identified by name along with the allowance for the input datatype to be different to the output.
Definition at line 304 of file ParserFlatbuffersFixture.hpp.
References m_NetworkIdentifier, m_Parser, m_Runtime, and armnn::VerifyTensorInfoDataType().
|
inline |
Definition at line 61 of file ParserFlatbuffersFixture.hpp.
References armnn::CpuRef, armnn::Optimize(), ReadStringToBinary(), and armnn::Success.
Referenced by BOOST_FIXTURE_TEST_CASE(), and SetupSingleInputSingleOutput().
|
inline |
Definition at line 94 of file ParserFlatbuffersFixture.hpp.
References Setup().
std::vector<uint8_t> m_GraphBinary |
Definition at line 50 of file ParserFlatbuffersFixture.hpp.
std::string m_JsonString |
Definition at line 51 of file ParserFlatbuffersFixture.hpp.
armnn::NetworkId m_NetworkIdentifier |
Definition at line 54 of file ParserFlatbuffersFixture.hpp.
Referenced by RunTest().
ITfLiteParserPtr m_Parser |
Definition at line 52 of file ParserFlatbuffersFixture.hpp.
Referenced by ParserFlatbuffersFixture(), and RunTest().
armnn::IRuntimePtr m_Runtime |
Definition at line 53 of file ParserFlatbuffersFixture.hpp.
Referenced by RunTest().
std::string m_SingleInputName |
If the single-input-single-output overload of Setup() is called, these will store the input and output name so they don't need to be passed to the single-input-single-output overload of RunTest().
Definition at line 58 of file ParserFlatbuffersFixture.hpp.
Referenced by RunTest().
std::string m_SingleOutputName |
Definition at line 59 of file ParserFlatbuffersFixture.hpp.
Referenced by RunTest().