From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_equal_8cpp_source.xhtml | 123 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 21.02/_equal_8cpp_source.xhtml (limited to '21.02/_equal_8cpp_source.xhtml') diff --git a/21.02/_equal_8cpp_source.xhtml b/21.02/_equal_8cpp_source.xhtml new file mode 100644 index 0000000000..198649be8b --- /dev/null +++ b/21.02/_equal_8cpp_source.xhtml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfParser/test/Equal.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Equal.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>
9 
10 BOOST_AUTO_TEST_SUITE(TensorflowParser)
11 
12  struct EqualFixture : public armnnUtils::ParserPrototxtFixture<armnnTfParser::ITfParser>
13  {
14  EqualFixture()
15  {
16  m_Prototext = R"(
17 node {
18  name: "input0"
19  op: "Placeholder"
20  attr {
21  key: "dtype"
22  value {
23  type: DT_FLOAT
24  }
25  }
26  attr {
27  key: "shape"
28  value {
29  shape {
30  }
31  }
32  }
33 }
34 node {
35  name: "input1"
36  op: "Placeholder"
37  attr {
38  key: "dtype"
39  value {
40  type: DT_FLOAT
41  }
42  }
43  attr {
44  key: "shape"
45  value {
46  shape {
47  }
48  }
49  }
50 }
51 node {
52  name: "output"
53  op: "Equal"
54  input: "input0"
55  input: "input1"
56  attr {
57  key: "T"
58  value {
59  type: DT_FLOAT
60  }
61  }
62 }
63  )";
64  }
65  };
66 
67 BOOST_FIXTURE_TEST_CASE(ParseEqualUnsupportedBroadcast, EqualFixture)
68 {
69  BOOST_REQUIRE_THROW(Setup({ { "input0", {2, 3} },
70  { "input1", {1, 2, 2, 3} } },
71  { "output" }),
73 }
74 
75 struct EqualFixtureAutoSetup : public EqualFixture
76 {
77  EqualFixtureAutoSetup(const armnn::TensorShape& input0Shape,
78  const armnn::TensorShape& input1Shape)
79  : EqualFixture()
80  {
81  Setup({ { "input0", input0Shape },
82  { "input1", input1Shape } },
83  { "output" });
84  }
85 };
86 
87 struct EqualTwoByTwo : public EqualFixtureAutoSetup
88 {
89  EqualTwoByTwo() : EqualFixtureAutoSetup({2,2}, {2,2}) {}
90 };
91 
92 BOOST_FIXTURE_TEST_CASE(ParseEqualTwoByTwo, EqualTwoByTwo)
93 {
94  RunComparisonTest<2>({ { "input0", { 1.0f, 2.0f, 3.0f, 2.0f } },
95  { "input1", { 1.0f, 5.0f, 2.0f, 2.0f } } },
96  { { "output", { 1, 0, 0, 1 } } });
97 }
98 
99 struct EqualBroadcast1DAnd4D : public EqualFixtureAutoSetup
100 {
101  EqualBroadcast1DAnd4D() : EqualFixtureAutoSetup({1}, {1,1,2,2}) {}
102 };
103 
104 BOOST_FIXTURE_TEST_CASE(ParseEqualBroadcast1DToTwoByTwo, EqualBroadcast1DAnd4D)
105 {
106  RunComparisonTest<4>({ { "input0", { 2.0f } },
107  { "input1", { 1.0f, 2.0f, 3.0f, 2.0f } } },
108  { { "output", { 0, 1, 0, 1 } } });
109 }
110 
111 struct EqualBroadcast4DAnd1D : public EqualFixtureAutoSetup
112 {
113  EqualBroadcast4DAnd1D() : EqualFixtureAutoSetup({1,1,2,2}, {1}) {}
114 };
115 
116 BOOST_FIXTURE_TEST_CASE(ParseEqualBroadcast4DAnd1D, EqualBroadcast4DAnd1D)
117 {
118  RunComparisonTest<4>({ { "input0", { 1.0f, 2.0f, 3.0f, 2.0f } },
119  { "input1", { 3.0f } } },
120  { { "output", { 0, 0, 1, 0 } } });
121 }
122 
123 struct EqualMultiDimBroadcast : public EqualFixtureAutoSetup
124 {
125  EqualMultiDimBroadcast() : EqualFixtureAutoSetup({1,1,2,1}, {1,2,1,3}) {}
126 };
127 
128 BOOST_FIXTURE_TEST_CASE(ParseEqualMultiDimBroadcast, EqualMultiDimBroadcast)
129 {
130  RunComparisonTest<4>({ { "input0", { 1.0f, 2.0f } },
131  { "input1", { 1.0f, 2.0f, 3.0f,
132  3.0f, 2.0f, 2.0f } } },
133  { { "output", { 1, 0, 0,
134  0, 1, 0,
135  0, 0, 0,
136  0, 1, 1 } } });
137 }
138 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+ + + + +
BOOST_FIXTURE_TEST_CASE(ParseEqualUnsupportedBroadcast, EqualFixture)
Definition: Equal.cpp:67
+
BOOST_AUTO_TEST_SUITE_END()
+ + + +
+
+ + + + -- cgit v1.2.1