MCPcopy Create free account
hub / github.com/ARM-software/armnn / CastUint8ToFp32Test

Function CastUint8ToFp32Test

delegate/test/CastTest.cpp:17–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17void CastUint8ToFp32Test(std::vector<armnn::BackendId>& backends)
18{
19 std::vector<int32_t> inputShape {1, 3, 2, 3};
20
21 std::vector<uint8_t> inputValues { 1, 3, 1, 3, 1, 3, 1, 3, 1,
22 3, 1, 3, 1, 2, 1, 3, 1, 3 };
23
24 std::vector<float> expectedOutputValues { 1.0f, 3.0f, 1.0f, 3.0f, 1.0f, 3.0f, 1.0f, 3.0f, 1.0f,
25 3.0f, 1.0f, 3.0f, 1.0f, 2.0f, 1.0f, 3.0f, 1.0f, 3.0f };
26
27 CastTest<uint8_t, float>(::tflite::TensorType_UINT8,
28 ::tflite::TensorType_FLOAT32,
29 inputShape,
30 inputValues,
31 expectedOutputValues,
32 1.0f,
33 0,
34 backends);
35}
36
37void CastInt32ToFp32Test(std::vector<armnn::BackendId>& backends)
38{

Callers 1

CastTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected