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

Function ResizeBiliniarFloat32Test

delegate/test/ResizeTest.cpp:13–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11{
12
13void ResizeBiliniarFloat32Test(const std::vector<armnn::BackendId>& backends = {})
14{
15 // Set input data
16 std::vector<float> input1Values
17 {
18 0.0f, 1.0f, 2.0f,
19 3.0f, 4.0f, 5.0f,
20 6.0f, 7.0f, 8.0f
21 };
22 const std::vector<int32_t> input2NewShape { 5, 5 };
23
24 // Calculate output data
25 std::vector<float> expectedOutputValues
26 {
27 0.0f, 0.6f, 1.2f, 1.8f, 2.0f,
28 1.8f, 2.4f, 3.0f, 3.6f, 3.8f,
29 3.6f, 4.2f, 4.8f, 5.4f, 5.6f,
30 5.4f, 6.0f, 6.6f, 7.2f, 7.4f,
31 6.0f, 6.6f, 7.2f, 7.8f, 8.0f
32 };
33
34 const std::vector<int32_t> input1Shape { 1, 3, 3, 1 };
35 const std::vector<int32_t> input2Shape { 2 };
36 const std::vector<int32_t> expectedOutputShape = { 1, 5, 5, 1 };
37
38 ResizeFP32TestImpl(tflite::BuiltinOperator_RESIZE_BILINEAR,
39 input1Values,
40 input1Shape,
41 input2NewShape,
42 input2Shape,
43 expectedOutputValues,
44 expectedOutputShape);
45}
46
47void ResizeNearestNeighbourFloat32Test(const std::vector<armnn::BackendId>& backends = {})
48{

Callers 1

ResizeTest.cppFile · 0.85

Calls 1

ResizeFP32TestImplFunction · 0.85

Tested by

no test coverage detected