ArmNN
 20.02
AddDebug.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "Optimization.hpp"
8 #include "NetworkUtils.hpp"
9 
10 namespace armnn
11 {
12 namespace optimizations
13 {
14 
16 {
17 public:
18 
19  void Run(Graph& graph, Layer& layer) const
20  {
21  if (layer.GetType() != LayerType::Debug && layer.GetType() != LayerType::Output)
22  {
23  // if the inputs/outputs of this layer do not have a debug layer
24  // insert the debug layer after them
25  InsertDebugLayerAfter(graph, layer);
26  }
27  }
28 
29 protected:
30  AddDebugImpl() = default;
31  ~AddDebugImpl() = default;
32 };
33 
35 
36 } // namespace optimizations
37 } // namespace armnn
Copyright (c) 2020 ARM Limited.
LayerType GetType() const
Definition: Layer.hpp:259
std::vector< DebugLayer * > InsertDebugLayerAfter(Graph &graph, Layer &layer)
void Run(Graph &graph, Layer &layer) const
Definition: AddDebug.hpp:19