ArmNN
NotReleased
|
#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) |
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) |
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 |
std::string | m_SingleOutputName |
Definition at line 28 of file ParserFlatbuffersSerializeFixture.hpp.
|
inline |
Definition at line 30 of file ParserFlatbuffersSerializeFixture.hpp.
|
inline |
Definition at line 154 of file ParserFlatbuffersSerializeFixture.hpp.
|
inline |
Definition at line 92 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 169 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 181 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 191 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 203 of file ParserFlatbuffersSerializeFixture.hpp.
References CompareTensors(), m_NetworkIdentifier, m_Parser, m_Runtime, and armnn::VerifyTensorInfoDataType().
|
inline |
Definition at line 48 of file ParserFlatbuffersSerializeFixture.hpp.
References armnn::CpuRef, armnn::Optimize(), ReadStringToBinary(), and armnn::Success.
Referenced by SetupSingleInputSingleOutput().
|
inline |
Definition at line 84 of file ParserFlatbuffersSerializeFixture.hpp.
References Setup().
std::vector<uint8_t> m_GraphBinary |
Definition at line 37 of file ParserFlatbuffersSerializeFixture.hpp.
std::string m_JsonString |
Definition at line 38 of file ParserFlatbuffersSerializeFixture.hpp.
armnn::NetworkId m_NetworkIdentifier |
Definition at line 41 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
std::unique_ptr<IDeserializer, void (*)(IDeserializer* parser)> m_Parser |
Definition at line 39 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
armnn::IRuntimePtr m_Runtime |
Definition at line 40 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 45 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().
std::string m_SingleOutputName |
Definition at line 46 of file ParserFlatbuffersSerializeFixture.hpp.
Referenced by RunTest().