20.02
|
#include <ParserFlatbuffersSerializeFixture.hpp>
Public Member Functions | |
ParserFlatbuffersSerializeFixture () | |
void | Setup () |
void | SetupSingleInputSingleOutput (const std::string &inputName, const std::string &outputName) |
bool | ReadStringToBinary () |
template<std::size_t NumOutputDimensions, armnn::DataType ArmnnType, typename DataType = armnn::ResolveType<ArmnnType>> | |
void | RunTest (unsigned int layersId, const std::vector< DataType > &inputData, const std::vector< DataType > &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 ArmnnInputType, armnn::DataType ArmnnOutputType, typename InputDataType = armnn::ResolveType<ArmnnInputType>, typename OutputDataType = armnn::ResolveType<ArmnnOutputType>> | |
void | RunTest (unsigned int layersId, const std::vector< InputDataType > &inputData, const std::vector< OutputDataType > &expectedOutputData) |
template<std::size_t NumOutputDimensions, armnn::DataType ArmnnType, typename DataType = armnn::ResolveType<ArmnnType>> | |
void | RunTest (unsigned int layersId, const std::map< std::string, std::vector< DataType >> &inputData, const std::map< std::string, std::vector< DataType >> &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 ArmnnInputType, armnn::DataType ArmnnOutputType, typename InputDataType = armnn::ResolveType<ArmnnInputType>, typename OutputDataType = armnn::ResolveType<ArmnnOutputType>> | |
void | RunTest (unsigned int layersId, const std::map< std::string, std::vector< InputDataType >> &inputData, const std::map< std::string, std::vector< OutputDataType >> &expectedOutputData) |
void | CheckTensors (const TensorRawPtr &tensors, size_t shapeSize, const std::vector< int32_t > &shape, armnnSerializer::TensorInfo tensorType, const std::string &name, const float scale, const int64_t zeroPoint) |
Public Attributes | |
std::vector< uint8_t > | m_GraphBinary |
std::string | m_JsonString |
std::unique_ptr< IDeserializer, void(*)(IDeserializer *parser)> | 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 27 of file ParserFlatbuffersSerializeFixture.hpp.
|
inline |
Definition at line 29 of file ParserFlatbuffersSerializeFixture.hpp.
|
inline |
Definition at line 153 of file ParserFlatbuffersSerializeFixture.hpp.
References armnn::IgnoreUnused().
|
inline |
Definition at line 91 of file ParserFlatbuffersSerializeFixture.hpp.
References deserialize_schema_end, deserialize_schema_start, and RunTest().
Referenced by Setup().
void RunTest | ( | unsigned int | layersId, |
const std::vector< DataType > & | inputData, | ||
const std::vector< DataType > & | expectedOutputData | ||
) |
Executes the network with the given input tensor and checks the result against the given output tensor.
This overload assumes the network has a single input and a single output.
Definition at line 168 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by ReadStringToBinary().
void RunTest | ( | unsigned int | layersId, |
const std::vector< InputDataType > & | inputData, | ||
const std::vector< OutputDataType > & | expectedOutputData | ||
) |
Definition at line 180 of file ParserFlatbuffersSerializeFixture.hpp.
References m_SingleInputName, and m_SingleOutputName.
void RunTest | ( | unsigned int | layersId, |
const std::map< std::string, std::vector< DataType >> & | inputData, | ||
const std::map< std::string, std::vector< DataType >> & | expectedOutputData | ||
) |
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 190 of file ParserFlatbuffersSerializeFixture.hpp.
void RunTest | ( | unsigned int | layersId, |
const std::map< std::string, std::vector< InputDataType >> & | inputData, | ||
const std::map< std::string, std::vector< OutputDataType >> & | expectedOutputData | ||
) |
Definition at line 202 of file ParserFlatbuffersSerializeFixture.hpp.
References CompareTensors(), m_NetworkIdentifier, m_Parser, m_Runtime, and armnn::VerifyTensorInfoDataType().
|
inline |
Definition at line 47 of file ParserFlatbuffersSerializeFixture.hpp.
References armnn::CpuRef, armnn::Optimize(), ReadStringToBinary(), and armnn::Success.
Referenced by SetupSingleInputSingleOutput().
|
inline |
Definition at line 83 of file ParserFlatbuffersSerializeFixture.hpp.
References Setup().
std::vector<uint8_t> m_GraphBinary |
Definition at line 36 of file ParserFlatbuffersSerializeFixture.hpp.
std::string m_JsonString |
Definition at line 37 of file ParserFlatbuffersSerializeFixture.hpp.
armnn::NetworkId m_NetworkIdentifier |
Definition at line 40 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
std::unique_ptr<IDeserializer, void (*)(IDeserializer* parser)> m_Parser |
Definition at line 38 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
armnn::IRuntimePtr m_Runtime |
Definition at line 39 of file ParserFlatbuffersSerializeFixture.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 44 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
std::string m_SingleOutputName |
Definition at line 45 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().