ArmNN
 25.11
Loading...
Searching...
No Matches
SerializeLayerParameters.hpp
Go to the documentation of this file.
1//
2// Copyright © 2017,2022-2023 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5#pragma once
6
7#include <string>
8#include <functional>
10
11namespace armnn
12{
13
14using ParameterStringifyFunction = std::function<void(const std::string& name, const std::string& value)>;
15
16///
17/// StringifyLayerParameters allows serializing layer parameters to string.
18/// The default implementation is a no-op because this operation is considered
19/// non-vital for ArmNN and thus we allow adding new layer parameters without
20/// supplying the corresponding stringify functionality.
21///
22template <typename LayerParameter>
24{
25 static void Serialize(ParameterStringifyFunction&, const LayerParameter&) {}
26};
27
29{
30 static void Serialize(ParameterStringifyFunction& fn, const ActivationDescriptor& desc);
31};
32
37
42
47
52
54{
55 static void Serialize(ParameterStringifyFunction& fn, const ComparisonDescriptor& desc);
56};
57
62
67
72
77
82
87
92
97
99{
100 static void Serialize(ParameterStringifyFunction& fn, const GatherDescriptor& desc);
101};
102
107
109{
110 static void Serialize(ParameterStringifyFunction& fn, const LstmDescriptor& desc);
111};
112
114{
115 static void Serialize(ParameterStringifyFunction& fn, const MeanDescriptor& desc);
116};
117
122
124{
125 static void Serialize(ParameterStringifyFunction& fn, const OriginsDescriptor& desc);
126};
127
129{
130 static void Serialize(ParameterStringifyFunction& fn, const PadDescriptor& desc);
131};
133{
134 static void Serialize(ParameterStringifyFunction& fn, const PermuteDescriptor& desc);
135};
136
138{
139 static void Serialize(ParameterStringifyFunction& fn, const Pooling2dDescriptor& desc);
140};
141
143{
144 static void Serialize(ParameterStringifyFunction& fn, const Pooling3dDescriptor& desc);
145};
146
148{
149 static void Serialize(ParameterStringifyFunction& fn, const PreCompiledDescriptor& desc);
150};
151
153{
154 static void Serialize(ParameterStringifyFunction& fn, const FusedDescriptor& desc);
155};
156
158{
159 static void Serialize(ParameterStringifyFunction& fn, const ReduceDescriptor& desc);
160};
161
163{
164 static void Serialize(ParameterStringifyFunction& fn, const ReshapeDescriptor& desc);
165};
166
168{
169 static void Serialize(ParameterStringifyFunction& fn, const ResizeDescriptor& desc);
170};
171
176
181
183{
184 static void Serialize(ParameterStringifyFunction& fn, const StackDescriptor& desc);
185};
186
191
193{
194 static void Serialize(ParameterStringifyFunction& fn, const SoftmaxDescriptor& desc);
195};
196
198{
199 static void Serialize(ParameterStringifyFunction& fn, const TileDescriptor& desc);
200};
201
206
208{
209 static void Serialize(ParameterStringifyFunction& fn, const TransposeDescriptor& desc);
210};
211
213{
214 static void Serialize(ParameterStringifyFunction& fn, const ViewsDescriptor& desc);
215};
216
217} // namespace armnn
Copyright (c) 2021 ARM Limited and Contributors.
std::function< void(const std::string &name, const std::string &value)> ParameterStringifyFunction
An ActivationDescriptor for the ActivationLayer.
A BatchMatMulDescriptor for the BatchMatMul operator.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
A ChannelShuffleDescriptor for the ChannelShuffle operator.
A ComparisonDescriptor for the ComparisonLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
A Convolution3dDescriptor for the Convolution3dLayer.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
A FakeQuantizationDescriptor for the FakeQuantizationLayer.
A FullyConnectedDescriptor for the FullyConnectedLayer.
A FusedDescriptor for the FusedLayer.
A GatherDescriptor for the GatherLayer.
A L2NormalizationDescriptor for the L2NormalizationLayer.
An LstmDescriptor for the LstmLayer.
A MeanDescriptor for the MeanLayer.
A NormalizationDescriptor for the NormalizationLayer.
An OriginsDescriptor for the ConcatLayer.
A PadDescriptor for the PadLayer.
A PermuteDescriptor for the PermuteLayer.
A Pooling2dDescriptor for the Pooling2dLayer.
A Pooling3dDescriptor for the Pooling3dLayer.
A PreCompiledDescriptor for the PreCompiledLayer.
A ReduceDescriptor for the REDUCE operators.
A ReshapeDescriptor for the ReshapeLayer.
A ResizeDescriptor for the ResizeLayer.
A SoftmaxDescriptor for the SoftmaxLayer.
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
A StackDescriptor for the StackLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
StringifyLayerParameters allows serializing layer parameters to string.
static void Serialize(ParameterStringifyFunction &, const LayerParameter &)
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
A TransposeDescriptor for the TransposeLayer.
A ViewsDescriptor for the SplitterLayer.