ArmNN
 21.08
Network.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 #include <armnn/LstmParams.hpp>
10 #include <armnn/TensorFwd.hpp>
11 #include <armnn/Types.hpp>
12 
13 #include <armnn/INetwork.hpp>
14 
15 #include <string>
16 #include <vector>
17 #include <map>
18 #include <memory>
19 
20 #include "Graph.hpp"
21 #include "Layer.hpp"
22 #include "OptimizedNetworkImpl.hpp"
23 
24 namespace armnn
25 {
26 class Graph;
27 
28 using NetworkImplPtr = std::unique_ptr<NetworkImpl, void (*)(NetworkImpl* network)>;
29 
30 /// Private implementation of INetwork.
32 {
33 public:
34  NetworkImpl(NetworkOptions networkOptions = {});
35  ~NetworkImpl();
36 
37  const Graph& GetGraph() const
38  { return *m_Graph; }
39 
41 
42  IConnectableLayer* AddInputLayer(LayerBindingId id, const char* name = nullptr);
43 
44  ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead")
45  IConnectableLayer* AddAbsLayer(const char* name = nullptr);
46 
47  IConnectableLayer* AddActivationLayer(const ActivationDescriptor& activationDescriptor,
48  const char* name = nullptr);
49 
50  IConnectableLayer* AddAdditionLayer(const char* name = nullptr);
51 
53  const char* name = nullptr);
54 
56  const ConstTensor& mean,
57  const ConstTensor& variance,
58  const ConstTensor& beta,
59  const ConstTensor& gamma,
60  const char* name = nullptr);
61 
62  IConnectableLayer* AddBatchToSpaceNdLayer(const BatchToSpaceNdDescriptor& batchToSpaceNdDescriptor,
63  const char* name = nullptr);
64 
65  IConnectableLayer* AddCastLayer(const char* name = nullptr);
66 
67  IConnectableLayer* AddComparisonLayer(const ComparisonDescriptor& comparisonDescriptor,
68  const char* name = nullptr);
69 
70  IConnectableLayer* AddConcatLayer(const ConcatDescriptor& concatDescriptor,
71  const char* name = nullptr);
72 
73  IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
74  const ConstTensor& weights,
75  const Optional<ConstTensor>& biases,
76  const char* name = nullptr);
77 
78  ARMNN_DEPRECATED_MSG("This AddConvolution2dLayer overload is deprecated")
79  IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
80  const ConstTensor& weights,
81  const char* name = nullptr);
82 
83  ARMNN_DEPRECATED_MSG("This AddConvolution2dLayer overload is deprecated")
84  IConnectableLayer* AddConvolution2dLayer(const Convolution2dDescriptor& convolution2dDescriptor,
85  const ConstTensor& weights,
86  const ConstTensor& biases,
87  const char* name = nullptr);
88 
89  IConnectableLayer* AddConstantLayer(const ConstTensor& input, const char* name = nullptr);
90 
91  IConnectableLayer* AddDepthToSpaceLayer(const DepthToSpaceDescriptor& depthToSpaceDescriptor,
92  const char* name = nullptr);
93 
95  const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
96  const ConstTensor& weights,
97  const Optional<ConstTensor>& biases,
98  const char* name = nullptr);
99 
100  ARMNN_DEPRECATED_MSG("This AddDepthwiseConvolution2dLayer overload is deprecated")
102  const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
103  const ConstTensor& weights,
104  const char* name = nullptr);
105 
106  ARMNN_DEPRECATED_MSG("This AddDepthwiseConvolution2dLayer overload is deprecated")
108  const DepthwiseConvolution2dDescriptor& convolution2dDescriptor,
109  const ConstTensor& weights,
110  const ConstTensor& biases,
111  const char* name = nullptr);
112 
113  IConnectableLayer* AddDequantizeLayer(const char* name = nullptr);
114 
116  const DetectionPostProcessDescriptor& descriptor,
117  const ConstTensor& anchors,
118  const char* name = nullptr);
119 
120  IConnectableLayer* AddDivisionLayer(const char* name = nullptr);
121 
122  IConnectableLayer* AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor& elementwiseUnaryDescriptor,
123  const char* name = nullptr);
124 
125  ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead")
126  IConnectableLayer* AddEqualLayer(const char* name = nullptr);
127 
128  IConnectableLayer* AddMergeLayer(const char* name = nullptr);
129 
130  IConnectableLayer* AddFillLayer(const FillDescriptor& fillDescriptor,
131  const char* name = nullptr);
132 
133  IConnectableLayer* AddFloorLayer(const char* name = nullptr);
134 
135  IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
136  const char* name = nullptr);
137 
138  IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
139  const Optional<ConstTensor>& weights,
140  const Optional<ConstTensor>& biases,
141  const char* name = nullptr);
142 
143  ARMNN_DEPRECATED_MSG("This AddFullyConnectedLayer overload is deprecated")
144  IConnectableLayer* AddFullyConnectedLayer(const FullyConnectedDescriptor& fullyConnectedDescriptor,
145  const ConstTensor& weights,
146  const Optional<ConstTensor>& biases,
147  const char* name = nullptr);
148 
149  ARMNN_DEPRECATED_MSG("This AddGatherLayer overload is deprecated")
150  IConnectableLayer* AddGatherLayer(const char* name = nullptr);
151 
152  IConnectableLayer* AddGatherLayer(const GatherDescriptor& gatherDescriptor,
153  const char* name = nullptr);
154 
155  ARMNN_DEPRECATED_MSG("Use AddComparisonLayer instead")
156  IConnectableLayer* AddGreaterLayer(const char* name = nullptr);
157 
159  const char* name = nullptr);
160 
162  const char* name = nullptr);
163 
164  IConnectableLayer* AddLogSoftmaxLayer(const LogSoftmaxDescriptor& logSoftmaxDescriptor,
165  const char* name = nullptr);
166 
167  IConnectableLayer* AddLogicalBinaryLayer(const LogicalBinaryDescriptor& logicalBinaryDescriptor,
168  const char* name = nullptr);
169 
170  IConnectableLayer* AddLstmLayer(const LstmDescriptor& descriptor,
171  const LstmInputParams& params,
172  const char* name = nullptr);
173 
174  IConnectableLayer* AddMaximumLayer(const char* name = nullptr);
175 
176  IConnectableLayer* AddMeanLayer(const MeanDescriptor& meanDescriptor, const char* name = nullptr);
177 
178  IConnectableLayer* AddMinimumLayer(const char* name = nullptr);
179 
180  ARMNN_DEPRECATED_MSG("Use AddConcatLayer instead")
181  IConnectableLayer* AddMergerLayer(const MergerDescriptor& mergerDescriptor,
182  const char* name = nullptr);
183 
184  IConnectableLayer* AddMultiplicationLayer(const char* name = nullptr);
185 
186  IConnectableLayer* AddNormalizationLayer(const NormalizationDescriptor& normalizationDescriptor,
187  const char* name = nullptr);
188 
189  IConnectableLayer* AddOutputLayer(LayerBindingId id, const char* name = nullptr);
190 
191  IConnectableLayer* AddPadLayer(const PadDescriptor& padDescriptor, const char* name = nullptr);
192 
193  IConnectableLayer* AddPermuteLayer(const PermuteDescriptor& permuteDescriptor,
194  const char* name = nullptr);
195 
196  IConnectableLayer* AddPooling2dLayer(const Pooling2dDescriptor& pooling2dDescriptor,
197  const char* name = nullptr);
198 
199  IConnectableLayer* AddPreluLayer(const char* name = nullptr);
200 
201  IConnectableLayer* AddQuantizeLayer(const char* name = nullptr);
202 
204  const LstmInputParams& params,
205  const char* name = nullptr);
206 
208  const char* name = nullptr);
209 
210  IConnectableLayer* AddRankLayer(const char* name = nullptr);
211 
212  IConnectableLayer* AddReduceLayer(const ReduceDescriptor& reduceDescriptor,
213  const char* name = nullptr);
214 
215  ARMNN_DEPRECATED_MSG("Use AddResizeLayer instead")
217  const char* name = nullptr);
218 
219  IConnectableLayer* AddResizeLayer(const ResizeDescriptor& resizeDescriptor,
220  const char* name = nullptr);
221 
222  IConnectableLayer* AddReshapeLayer(const ReshapeDescriptor& reshapeDescriptor,
223  const char* name = nullptr);
224 
225  ARMNN_DEPRECATED_MSG("Use AddElementwiseUnaryLayer instead")
226  IConnectableLayer* AddRsqrtLayer(const char* name = nullptr);
227 
228  IConnectableLayer* AddShapeLayer(const char* name = nullptr);
229 
230  IConnectableLayer* AddSliceLayer(const SliceDescriptor& sliceDescriptor, const char* name = nullptr);
231 
232  IConnectableLayer* AddSoftmaxLayer(const SoftmaxDescriptor& softmaxDescriptor,
233  const char* name = nullptr);
234 
235  IConnectableLayer* AddSplitterLayer(const ViewsDescriptor& splitterDescriptor,
236  const char* name = nullptr);
237 
238  IConnectableLayer* AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor& spaceToBatchNdDescriptor,
239  const char* name = nullptr);
240 
241  IConnectableLayer* AddSpaceToDepthLayer(const SpaceToDepthDescriptor& spaceToDepthDescriptor,
242  const char* name = nullptr);
243 
244  IConnectableLayer* AddStackLayer(const StackDescriptor& stackDescriptor,
245  const char* name = nullptr);
246 
248  const char* name = nullptr);
249 
250  IConnectableLayer* AddStridedSliceLayer(const StridedSliceDescriptor& stridedSliceDescriptor,
251  const char* name = nullptr);
252 
253  IConnectableLayer* AddSubtractionLayer(const char* name = nullptr);
254 
255  IConnectableLayer* AddSwitchLayer(const char* name = nullptr);
256 
258  const ConstTensor& weights,
259  const Optional<ConstTensor>& biases,
260  const char* name = nullptr);
261 
262  IConnectableLayer* AddTransposeLayer(const TransposeDescriptor& transposeDescriptor,
263  const char* name = nullptr);
264 
266  const LstmInputParams& params,
267  const char* name = nullptr);
268 
269  void Accept(ILayerVisitor& visitor) const;
270 
271  void ExecuteStrategy(IStrategy& strategy) const;
272 
273 private:
274  IConnectableLayer* AddConvolution2dLayerImpl(const Convolution2dDescriptor& convolution2dDescriptor,
275  const ConstTensor& weights,
276  const Optional<ConstTensor>& biases,
277  const char* name);
278 
279  IConnectableLayer* AddDepthwiseConvolution2dLayerImpl(const DepthwiseConvolution2dDescriptor& conv2dDescriptor,
280  const ConstTensor& weights,
281  const Optional<ConstTensor>& biases,
282  const char* name);
283 
284  bool GetShapeInferenceMethod();
285  NetworkOptions m_NetworkOptions;
286 
287  std::unique_ptr<Graph> m_Graph;
288  ModelOptions m_ModelOptions;
289 };
290 
292 {
293  bool m_Warning;
294  bool m_Error;
295 
297  : m_Warning(warning), m_Error(error)
298  {}
299 
301  : OptimizationResult(false, false)
302  {}
303 
304  bool IsOk() const
305  { return !m_Warning && !m_Error; }
306  bool IsWarningOnly() const
307  { return m_Warning && !m_Error; }
308  bool IsError() const
309  { return m_Error; }
310 
311 };
312 
313 using BackendsMap = std::map<BackendId, std::unique_ptr<class IBackendInternal>>;
314 
316  struct BackendSettings& backendSettings);
317 
319  BackendsMap& backends,
320  TensorHandleFactoryRegistry& registry,
321  bool importEnabled,
322  Optional<std::vector<std::string>&> errMessages);
323 
325  BackendSettings& backendSettings,
326  Graph::Iterator& firstLayer,
327  Graph::Iterator& lastLayer,
328  Optional<std::vector<std::string>&> errMessages);
329 
330 } // namespace armnn
IConnectableLayer * AddReduceLayer(const ReduceDescriptor &reduceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2156
IConnectableLayer * AddRsqrtLayer(const char *name=nullptr)
Definition: Network.cpp:2423
OptimizationResult AssignBackends(OptimizedNetworkImpl *optNetObjPtr, BackendSettings &backendSettings, Graph::Iterator &firstLayer, Graph::Iterator &lastLayer, Optional< std::vector< std::string > &> errMessages)
Definition: Network.cpp:933
A ViewsDescriptor for the SplitterLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
IConnectableLayer * AddResizeLayer(const ResizeDescriptor &resizeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2176
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
IConnectableLayer * AddQuantizeLayer(const char *name=nullptr)
Definition: Network.cpp:2397
OptimizationResult(bool warning, bool error)
Definition: Network.hpp:296
IConnectableLayer * AddRankLayer(const char *name=nullptr)
Definition: Network.cpp:2151
A ReshapeDescriptor for the ReshapeLayer.
IConnectableLayer * AddAdditionLayer(const char *name=nullptr)
Definition: Network.cpp:2119
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:78
IConnectableLayer * AddAbsLayer(const char *name=nullptr)
Definition: Network.cpp:2114
IConnectableLayer * AddPooling2dLayer(const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr)
Definition: Network.cpp:2056
NetworkImpl(NetworkOptions networkOptions={})
Definition: Network.cpp:1790
std::vector< BackendOptions > ModelOptions
IConnectableLayer * AddMergeLayer(const char *name=nullptr)
Definition: Network.cpp:2440
A Convolution2dDescriptor for the Convolution2dLayer.
IConnectableLayer * AddQuantizedLstmLayer(const QuantizedLstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2496
IConnectableLayer * AddConstantLayer(const ConstTensor &input, const char *name=nullptr)
Definition: Network.cpp:2204
IConnectableLayer * AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr)
Definition: Network.cpp:1827
IConnectableLayer * AddNormalizationLayer(const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr)
Definition: Network.cpp:2074
Status PrintGraph()
Definition: Network.cpp:1799
IConnectableLayer * AddMeanLayer(const MeanDescriptor &meanDescriptor, const char *name=nullptr)
Definition: Network.cpp:2387
void ExecuteStrategy(IStrategy &strategy) const
Definition: Network.cpp:2832
IConnectableLayer * AddMinimumLayer(const char *name=nullptr)
Definition: Network.cpp:2103
IConnectableLayer * AddSpaceToDepthLayer(const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr)
Definition: Network.cpp:2225
std::vector< BackendOptions > NetworkOptions
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
IConnectableLayer * AddActivationLayer(const ActivationDescriptor &activationDescriptor, const char *name=nullptr)
Definition: Network.cpp:2062
Copyright (c) 2021 ARM Limited and Contributors.
LayerList::const_iterator Iterator
Definition: Graph.hpp:50
IConnectableLayer * AddDepthwiseConvolution2dLayer(const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
Definition: Network.cpp:2012
IConnectableLayer * AddLogSoftmaxLayer(const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr)
Definition: Network.cpp:2198
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
Private implementation of INetwork.
Definition: Network.hpp:31
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
Definition: Types.hpp:244
A ResizeDescriptor for the ResizeLayer.
A StackDescriptor for the StackLayer.
IConnectableLayer * AddMergerLayer(const MergerDescriptor &mergerDescriptor, const char *name=nullptr)
Definition: Network.cpp:2108
IConnectableLayer * AddFloorLayer(const char *name=nullptr)
Definition: Network.cpp:2231
A PadDescriptor for the PadLayer.
IConnectableLayer * AddMultiplicationLayer(const char *name=nullptr)
Definition: Network.cpp:2124
IConnectableLayer * AddQLstmLayer(const QLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2534
IConnectableLayer * AddStridedSliceLayer(const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2407
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:1805
An LstmDescriptor for the LstmLayer.
IConnectableLayer * AddTransposeConvolution2dLayer(const TransposeConvolution2dDescriptor &descriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
Definition: Network.cpp:2455
IConnectableLayer * AddPreluLayer(const char *name=nullptr)
Definition: Network.cpp:2450
A L2NormalizationDescriptor for the L2NormalizationLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:56
An OriginsDescriptor for the ConcatLayer.
A ReduceDescriptor for the REDUCE operators.
IConnectableLayer * AddDetectionPostProcessLayer(const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr)
Definition: Network.cpp:2040
A FullyConnectedDescriptor for the FullyConnectedLayer.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:327
A GatherDescriptor for the GatherLayer.
Status
enumeration
Definition: Types.hpp:29
IConnectableLayer * AddDivisionLayer(const char *name=nullptr)
Definition: Network.cpp:2377
IConnectableLayer * AddArgMinMaxLayer(const ArgMinMaxDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2068
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr)
Definition: Network.cpp:2129
IConnectableLayer * AddDequantizeLayer(const char *name=nullptr)
Definition: Network.cpp:2402
IConnectableLayer * AddConcatLayer(const ConcatDescriptor &concatDescriptor, const char *name=nullptr)
Definition: Network.cpp:1930
A StandInDescriptor for the StandIn layer.
A QLstmDescriptor for the QLstmLayer.
IConnectableLayer * AddSwitchLayer(const char *name=nullptr)
Definition: Network.cpp:2445
IConnectableLayer * AddSubtractionLayer(const char *name=nullptr)
Definition: Network.cpp:2382
IConnectableLayer * AddResizeBilinearLayer(const ResizeBilinearDescriptor &resizeDesc, const char *name=nullptr)
Definition: Network.cpp:2162
An ActivationDescriptor for the ActivationLayer.
Definition: Descriptors.hpp:25
IConnectableLayer * AddLogicalBinaryLayer(const LogicalBinaryDescriptor &logicalBinaryDescriptor, const char *name=nullptr)
Definition: Network.cpp:2676
void Accept(ILayerVisitor &visitor) const
Definition: Network.cpp:2824
A SliceDescriptor for the SliceLayer.
IConnectableLayer * AddStandInLayer(const StandInDescriptor &descriptor, const char *name=nullptr)
Definition: Network.cpp:2490
IConnectableLayer * AddPermuteLayer(const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)
Definition: Network.cpp:2050
IConnectableLayer * AddL2NormalizationLayer(const L2NormalizationDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2192
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
bool IsWarningOnly() const
Definition: Network.hpp:306
IConnectableLayer * AddTransposeLayer(const TransposeDescriptor &transposeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2477
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
Definition: Descriptors.hpp:98
IConnectableLayer * AddUnidirectionalSequenceLstmLayer(const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2682
IConnectableLayer * AddFullyConnectedLayer(const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr)
Definition: Network.cpp:1839
IConnectableLayer * AddReshapeLayer(const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)
Definition: Network.cpp:2213
IConnectableLayer * AddMaximumLayer(const char *name=nullptr)
Definition: Network.cpp:2098
IConnectableLayer * AddShapeLayer(const char *name=nullptr)
Definition: Network.cpp:2181
BackendsMap CreateSupportedBackends(TensorHandleFactoryRegistry &handleFactoryRegistry, BackendSettings &backendSettings)
Definition: Network.cpp:1073
IConnectableLayer * AddCastLayer(const char *name=nullptr)
Definition: Network.cpp:1816
IConnectableLayer * AddStackLayer(const StackDescriptor &stackDescriptor, const char *name=nullptr)
Definition: Network.cpp:2483
IConnectableLayer * AddSoftmaxLayer(const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)
Definition: Network.cpp:2086
IConnectableLayer * AddGreaterLayer(const char *name=nullptr)
Definition: Network.cpp:2413
IConnectableLayer * AddEqualLayer(const char *name=nullptr)
Definition: Network.cpp:2418
IConnectableLayer * AddFillLayer(const FillDescriptor &fillDescriptor, const char *name=nullptr)
Definition: Network.cpp:1833
const Graph & GetGraph() const
Definition: Network.hpp:37
A MeanDescriptor for the MeanLayer.
IConnectableLayer * AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr)
Definition: Network.cpp:2219
A TransposeDescriptor for the TransposeLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
IConnectableLayer * AddComparisonLayer(const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr)
Definition: Network.cpp:1821
OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry &registry, bool importEnabled, Optional< std::vector< std::string > &> errMessages)
Definition: Network.cpp:1545
#define ARMNN_DEPRECATED_MSG(message)
Definition: Deprecated.hpp:43
IConnectableLayer * AddBatchNormalizationLayer(const BatchNormalizationDescriptor &desc, const ConstTensor &mean, const ConstTensor &variance, const ConstTensor &beta, const ConstTensor &gamma, const char *name=nullptr)
Definition: Network.cpp:2134
IConnectableLayer * AddGatherLayer(const char *name=nullptr)
Definition: Network.cpp:2428
A Pooling2dDescriptor for the Pooling2dLayer.
A NormalizationDescriptor for the NormalizationLayer.
IConnectableLayer * AddDepthToSpaceLayer(const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2006
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
IConnectableLayer * AddConvolution2dLayer(const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
Definition: Network.cpp:1958
IConnectableLayer * AddSplitterLayer(const ViewsDescriptor &splitterDescriptor, const char *name=nullptr)
Definition: Network.cpp:2092
IConnectableLayer * AddBatchToSpaceNdLayer(const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr)
Definition: Network.cpp:1810
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
IConnectableLayer * AddLstmLayer(const LstmDescriptor &descriptor, const LstmInputParams &params, const char *name=nullptr)
Definition: Network.cpp:2236
IConnectableLayer * AddPadLayer(const PadDescriptor &padDescriptor, const char *name=nullptr)
Definition: Network.cpp:2392
A SoftmaxDescriptor for the SoftmaxLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A FillDescriptor for the FillLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap
Definition: Network.hpp:313
A PermuteDescriptor for the PermuteLayer.
std::unique_ptr< NetworkImpl, void(*)(NetworkImpl *network)> NetworkImplPtr
Definition: Network.hpp:28
IConnectableLayer * AddSliceLayer(const SliceDescriptor &sliceDescriptor, const char *name=nullptr)
Definition: Network.cpp:2081
IConnectableLayer * AddInstanceNormalizationLayer(const InstanceNormalizationDescriptor &desc, const char *name=nullptr)
Definition: Network.cpp:2186