ArmNN
 21.02
TestInputOutputLayerVisitor.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
6 #include "Network.hpp"
7 
8 namespace armnn
9 {
10 
11 BOOST_AUTO_TEST_SUITE(TestInputOutputLayerVisitor)
12 
13 BOOST_AUTO_TEST_CASE(CheckInputLayerVisitorBindingIdAndName)
14 {
15  const char* layerName = "InputLayer";
16  TestInputLayerVisitor visitor(1, layerName);
17  NetworkImpl net;
18 
19  IConnectableLayer *const layer = net.AddInputLayer(1, layerName);
20  layer->Accept(visitor);
21 }
22 
23 BOOST_AUTO_TEST_CASE(CheckInputLayerVisitorBindingIdAndNameNull)
24 {
25  TestInputLayerVisitor visitor(1);
26  NetworkImpl net;
27 
28  IConnectableLayer *const layer = net.AddInputLayer(1);
29  layer->Accept(visitor);
30 }
31 
32 BOOST_AUTO_TEST_CASE(CheckOutputLayerVisitorBindingIdAndName)
33 {
34  const char* layerName = "OutputLayer";
35  TestOutputLayerVisitor visitor(1, layerName);
36  NetworkImpl net;
37 
38  IConnectableLayer *const layer = net.AddOutputLayer(1, layerName);
39  layer->Accept(visitor);
40 }
41 
42 BOOST_AUTO_TEST_CASE(CheckOutputLayerVisitorBindingIdAndNameNull)
43 {
44  TestOutputLayerVisitor visitor(1);
45  NetworkImpl net;
46 
47  IConnectableLayer *const layer = net.AddOutputLayer(1);
48  layer->Accept(visitor);
49 }
50 
52 
53 } //namespace armnn
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:62
Copyright (c) 2021 ARM Limited and Contributors.
Private implementation of INetwork.
Definition: Network.hpp:31
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:1682
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:1957
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
BOOST_AUTO_TEST_SUITE_END()
virtual void Accept(ILayerVisitor &visitor) const =0
Apply a visitor to this layer.