From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- ...nn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 20.02/armnn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml (limited to '20.02/armnn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml') diff --git a/20.02/armnn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml b/20.02/armnn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml new file mode 100644 index 0000000000..7bc4cdda0b --- /dev/null +++ b/20.02/armnn_tf_lite_parser_2test_2_pad_8cpp_source.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfLiteParser/test/Pad.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Pad.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include <boost/test/unit_test.hpp>
8 #include "../TfLiteParser.hpp"
9 
10 #include <string>
11 #include <iostream>
12 
13 BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
14 
15 struct PadFixture : public ParserFlatbuffersFixture
16 {
17  explicit PadFixture(const std::string & inputShape,
18  const std::string & outputShape,
19  const std::string & padListShape,
20  const std::string & padListData)
21  {
22  m_JsonString = R"(
23  {
24  "version": 3,
25  "operator_codes": [ { "builtin_code": "PAD" } ],
26  "subgraphs": [ {
27  "tensors": [
28  {
29  "shape": )" + inputShape + R"(,
30  "type": "FLOAT32",
31  "buffer": 0,
32  "name": "inputTensor",
33  "quantization": {
34  "min": [ 0.0 ],
35  "max": [ 255.0 ],
36  "scale": [ 1.0 ],
37  "zero_point": [ 0 ],
38  }
39  },
40  {
41  "shape": )" + outputShape + R"(,
42  "type": "FLOAT32",
43  "buffer": 1,
44  "name": "outputTensor",
45  "quantization": {
46  "min": [ 0.0 ],
47  "max": [ 255.0 ],
48  "scale": [ 1.0 ],
49  "zero_point": [ 0 ],
50  }
51  },
52  {
53  "shape": )" + padListShape + R"( ,
54  "type": "INT32",
55  "buffer": 2,
56  "name": "padList",
57  "quantization": {
58  "min": [ 0.0 ],
59  "max": [ 255.0 ],
60  "scale": [ 1.0 ],
61  "zero_point": [ 0 ],
62  }
63  }
64  ],
65  "inputs": [ 0 ],
66  "outputs": [ 1 ],
67  "operators": [
68  {
69  "opcode_index": 0,
70  "inputs": [ 0, 2 ],
71  "outputs": [ 1 ],
72  "custom_options_format": "FLEXBUFFERS"
73  }
74  ],
75  } ],
76  "buffers" : [
77  { },
78  { },
79  { "data": )" + padListData + R"(, },
80  ]
81  }
82  )";
83  SetupSingleInputSingleOutput("inputTensor", "outputTensor");
84  }
85 };
86 
87 struct SimplePadFixture : public PadFixture
88 {
89  SimplePadFixture() : PadFixture("[ 2, 3 ]", "[ 4, 7 ]", "[ 2, 2 ]",
90  "[ 1,0,0,0, 1,0,0,0, 2,0,0,0, 2,0,0,0 ]") {}
91 };
92 
93 BOOST_FIXTURE_TEST_CASE(ParsePad, SimplePadFixture)
94 {
95  RunTest<2, armnn::DataType::Float32>
96  (0,
97  {{ "inputTensor", { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f }}},
98  {{ "outputTensor", { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
99  0.0f, 0.0f, 1.0f, 2.0f, 3.0f, 0.0f, 0.0f,
100  0.0f, 0.0f, 4.0f, 5.0f, 6.0f, 0.0f, 0.0f,
101  0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }}});
102 }
103 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+ + + +
BOOST_AUTO_TEST_SUITE_END()
+
void SetupSingleInputSingleOutput(const std::string &inputName, const std::string &outputName)
+
BOOST_FIXTURE_TEST_CASE(ParsePad, SimplePadFixture)
Definition: Pad.cpp:93
+
+
+ + + + -- cgit v1.2.1