24.02
|
Go to the documentation of this file.
46 const char* name =
nullptr);
51 const
char* name =
nullptr);
54 const
char* name =
nullptr);
61 const
char* name =
nullptr);
64 const
char* name =
nullptr);
67 const
char* name =
nullptr);
72 const
char* name =
nullptr);
75 const
char* name =
nullptr);
78 const
char* name =
nullptr);
81 const
char* name =
nullptr);
84 const
char* name =
nullptr);
89 const
char* name =
nullptr);
92 const
char* name =
nullptr);
98 const
char* name =
nullptr);
104 const
char* name =
nullptr);
107 const
char* name =
nullptr);
112 const
char* name =
nullptr);
117 const
char* name =
nullptr);
120 const
char* name =
nullptr);
123 const
char* name =
nullptr);
128 const
char* name =
nullptr);
131 const
char* name =
nullptr);
134 const
char* name =
nullptr);
137 const
char* name =
nullptr);
141 const
char* name =
nullptr);
155 const
char* name =
nullptr);
162 const
char* name =
nullptr);
165 const
char* name =
nullptr);
168 const
char* name =
nullptr);
173 const
char* name =
nullptr);
181 const
char* name =
nullptr);
184 const
char* name =
nullptr);
189 const
char* name =
nullptr);
192 const
char* name =
nullptr);
195 const
char* name =
nullptr);
204 const
char* name =
nullptr);
207 const
char* name =
nullptr);
210 const
char* name =
nullptr);
213 const
char* name =
nullptr);
216 const
char* name =
nullptr);
219 const
char* name =
nullptr);
222 const
char* name =
nullptr);
230 const
char* name =
nullptr);
235 const
char* name =
nullptr);
238 const
char* name =
nullptr);
242 const
char* name =
nullptr);
252 bool GetShapeInferenceMethod();
253 bool GetAllowExpandedDims();
274 {
return !m_Warning && !m_Error; }
276 {
return m_Warning && !m_Error; }
282 using BackendsMap = std::map<BackendId, std::unique_ptr<class IBackendInternal>>;
292 Optional<std::vector<std::string>&> errMessages);
298 Optional<std::vector<std::string>&> errMessages);
305 Optional<std::vector<std::string>&> errMessages);
312 : m_ReduceFp32ToFp16(false)
314 , m_DebugToFile(false)
315 , m_ReduceFp32ToBf16(false)
317 , m_ImportEnabled(false)
319 , m_ProfilingEnabled(false)
320 , m_ExportEnabled(false)
321 , m_AllowExpandedDims(false)
327 bool exportEnabled =
false,
bool debugToFile =
false)
328 : m_ReduceFp32ToFp16(reduceFp32ToFp16)
330 , m_DebugToFile(debugToFile)
331 , m_ReduceFp32ToBf16(reduceFp32ToBf16)
333 , m_ImportEnabled(importEnabled)
334 , m_ModelOptions(modelOptions)
335 , m_ProfilingEnabled(
false)
336 , m_ExportEnabled(exportEnabled)
337 , m_AllowExpandedDims(
false)
343 bool importEnabled,
ModelOptions modelOptions,
bool exportEnabled,
344 bool debugToFile,
bool allowExpandedDims)
345 : m_ReduceFp32ToFp16(reduceFp32ToFp16)
347 , m_DebugToFile(debugToFile)
348 , m_ReduceFp32ToBf16(reduceFp32ToBf16)
349 , m_shapeInferenceMethod(shapeInferenceMethod)
350 , m_ImportEnabled(importEnabled)
351 , m_ModelOptions(modelOptions)
352 , m_ProfilingEnabled(false)
353 , m_ExportEnabled(exportEnabled)
354 , m_AllowExpandedDims(allowExpandedDims)
365 bool m_ReduceFp32ToFp16 =
false;
368 bool m_Debug =
false;
371 bool m_DebugToFile =
false;
375 bool m_ReduceFp32ToBf16 =
false;
381 bool m_ImportEnabled =
false;
387 bool m_ProfilingEnabled =
false;
390 bool m_ExportEnabled =
false;
393 bool m_AllowExpandedDims =
false;
IConnectableLayer * AddDepthToSpaceLayer(const DepthToSpaceDescriptor &depthToSpaceDescriptor, const char *name=nullptr)
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
IConnectableLayer * AddTransposeConvolution2dLayer(const TransposeConvolution2dDescriptor &descriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr)
OptimizerOptionsOpaqueImpl()
IConnectableLayer * AddLogicalBinaryLayer(const LogicalBinaryDescriptor &logicalBinaryDescriptor, const char *name=nullptr)
A ViewsDescriptor for the SplitterLayer.
An ActivationDescriptor for the ActivationLayer.
IConnectableLayer * AddFullyConnectedLayer(const FullyConnectedDescriptor &fullyConnectedDescriptor, const char *name=nullptr)
A FullyConnectedDescriptor for the FullyConnectedLayer.
IConnectableLayer * AddReverseV2Layer(const char *name=nullptr)
bool IsWarningOnly() const
A QLstmDescriptor for the QLstmLayer.
OptimizationResult(bool warning, bool error)
IConnectableLayer * AddTransposeLayer(const TransposeDescriptor &transposeDescriptor, const char *name=nullptr)
IConnectableLayer * AddConvolution2dLayer(const Convolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
IConnectableLayer * AddBroadcastToLayer(const BroadcastToDescriptor &descriptor, const char *name=nullptr)
IConnectableLayer * AddTileLayer(const TileDescriptor &tileDescriptor, const char *name=nullptr)
A Pooling3dDescriptor for the Pooling3dLayer.
IConnectableLayer * AddDivisionLayer(const char *name=nullptr)
A ResizeDescriptor for the ResizeLayer.
An ArgMinMaxDescriptor for ArgMinMaxLayer.
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
IConnectableLayer * AddAdditionLayer(const char *name=nullptr)
A GatherDescriptor for the GatherLayer.
IConnectableLayer * AddSplitterLayer(const ViewsDescriptor &splitterDescriptor, const char *name=nullptr)
A L2NormalizationDescriptor for the L2NormalizationLayer.
A NormalizationDescriptor for the NormalizationLayer.
IConnectableLayer * AddSubtractionLayer(const char *name=nullptr)
IConnectableLayer * AddStridedSliceLayer(const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr)
A ChannelShuffleDescriptor for the ChannelShuffle operator.
IConnectableLayer * AddLogSoftmaxLayer(const LogSoftmaxDescriptor &logSoftmaxDescriptor, const char *name=nullptr)
IConnectableLayer * AddMeanLayer(const MeanDescriptor &meanDescriptor, const char *name=nullptr)
IConnectableLayer * AddResizeLayer(const ResizeDescriptor &resizeDescriptor, const char *name=nullptr)
OptimizationResult AssignBackends(OptimizedNetworkImpl *optNetObjPtr, BackendSettings &backendSettings, Graph::Iterator &firstLayer, Graph::Iterator &lastLayer, Optional< std::vector< std::string > & > errMessages)
IConnectableLayer * AddBatchMatMulLayer(const BatchMatMulDescriptor &desc, const char *name=nullptr)
LayerList::const_iterator Iterator
IConnectableLayer * AddLstmLayer(const LstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr)
IConnectableLayer * AddReduceLayer(const ReduceDescriptor &reduceDescriptor, const char *name=nullptr)
IConnectableLayer * AddConstantLayer(const ConstTensor &input, const char *name=nullptr)
OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, ShapeInferenceMethod shapeInferenceMethod, bool importEnabled, ModelOptions modelOptions, bool exportEnabled, bool debugToFile, bool allowExpandedDims)
IConnectableLayers::iterator IConnectableLayerIterator
A StackDescriptor for the StackLayer.
IConnectableLayer * AddDepthwiseConvolution2dLayer(const DepthwiseConvolution2dDescriptor &convolution2dDescriptor, const char *name=nullptr)
OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry ®istry, bool importEnabled, bool exportEnabled, Optional< std::vector< std::string > & > errMessages)
IConnectableLayer * AddComparisonLayer(const ComparisonDescriptor &comparisonDescriptor, const char *name=nullptr)
void ExecuteStrategy(IStrategy &strategy) const
IConnectableLayer * AddSwitchLayer(const char *name=nullptr)
IConnectableLayer * AddSpaceToDepthLayer(const SpaceToDepthDescriptor &spaceToDepthDescriptor, const char *name=nullptr)
IConnectableLayer * AddFloorLayer(const char *name=nullptr)
IConnectableLayer * AddPermuteLayer(const PermuteDescriptor &permuteDescriptor, const char *name=nullptr)
IConnectableLayer * AddRankLayer(const char *name=nullptr)
IConnectableLayer * AddArgMinMaxLayer(const ArgMinMaxDescriptor &desc, const char *name=nullptr)
A ElementwiseBinaryDescriptor for the ElementwiseBinaryLayer.
BackendsMap CreateSupportedBackends(TensorHandleFactoryRegistry &handleFactoryRegistry, BackendSettings &backendSettings)
IConnectableLayer * AddBatchToSpaceNdLayer(const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr)
IConnectableLayer * AddPreluLayer(const char *name=nullptr)
IConnectableLayer * AddUnidirectionalSequenceLstmLayer(const UnidirectionalSequenceLstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr)
IConnectableLayer * AddSoftmaxLayer(const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr)
std::vector< BackendOptions > NetworkOptions
A FusedDescriptor for the FusedLayer.
IConnectableLayer * AddBatchNormalizationLayer(const BatchNormalizationDescriptor &desc, const ConstTensor &mean, const ConstTensor &variance, const ConstTensor &beta, const ConstTensor &gamma, const char *name=nullptr)
IConnectableLayer * AddFillLayer(const FillDescriptor &fillDescriptor, const char *name=nullptr)
A PadDescriptor for the PadLayer.
IConnectableLayer * AddGatherNdLayer(const char *name=nullptr)
A TransposeDescriptor for the TransposeLayer.
A SliceDescriptor for the SliceLayer.
IConnectableLayer * AddStackLayer(const StackDescriptor &stackDescriptor, const char *name=nullptr)
IConnectableLayer * AddElementwiseUnaryLayer(const ElementwiseUnaryDescriptor &elementwiseUnaryDescriptor, const char *name=nullptr)
A ReshapeDescriptor for the ReshapeLayer.
IConnectableLayer * AddConvertFp16ToFp32Layer(const char *name=nullptr)
IConnectableLayer * AddOutputLayer(LayerBindingId id, const char *name=nullptr)
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
IConnectableLayer * AddReshapeLayer(const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr)
IConnectableLayer * AddQLstmLayer(const QLstmDescriptor &descriptor, const LstmInputParams ¶ms, const char *name=nullptr)
IConnectableLayer * AddInputLayer(LayerBindingId id, const char *name=nullptr)
const Graph & GetGraph() const
A PermuteDescriptor for the PermuteLayer.
A BatchMatMulDescriptor for the BatchMatMul operator.
IConnectableLayer * AddMinimumLayer(const char *name=nullptr)
IConnectableLayer * AddElementwiseBinaryLayer(const ElementwiseBinaryDescriptor &elementwiseBinaryDescriptor, const char *name=nullptr)
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
A Convolution3dDescriptor for the Convolution3dLayer.
IConnectableLayer * AddQuantizeLayer(const char *name=nullptr)
IConnectableLayer * AddNormalizationLayer(const NormalizationDescriptor &normalizationDescriptor, const char *name=nullptr)
Private implementation of INetwork.
IConnectableLayer * AddMergeLayer(const char *name=nullptr)
std::unique_ptr< NetworkImpl, void(*)(NetworkImpl *network)> NetworkImplPtr
IConnectableLayer * AddShapeLayer(const char *name=nullptr)
OptimizerOptionsOpaqueImpl(bool reduceFp32ToFp16, bool debug, bool reduceFp32ToBf16, bool importEnabled, ModelOptions modelOptions={}, bool exportEnabled=false, bool debugToFile=false)
IConnectableLayer * AddConcatLayer(const ConcatDescriptor &concatDescriptor, const char *name=nullptr)
IConnectableLayer * AddCastLayer(const char *name=nullptr)
@ ValidateOnly
Validate all output shapes.
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
A Convolution2dDescriptor for the Convolution2dLayer.
IConnectableLayer * AddFusedLayer(const FusedDescriptor &fusedDescriptor, const char *name=nullptr)
IConnectableLayer * AddStandInLayer(const StandInDescriptor &descriptor, const char *name=nullptr)
A ComparisonDescriptor for the ComparisonLayer.
A FillDescriptor for the FillLayer.
IConnectableLayer * AddQuantizedLstmLayer(const QuantizedLstmInputParams ¶ms, const char *name=nullptr)
A StandInDescriptor for the StandIn layer.
IConnectableLayer * AddDequantizeLayer(const char *name=nullptr)
An LstmDescriptor for the LstmLayer.
A StridedSliceDescriptor for the StridedSliceLayer.
A LogicalBinaryDescriptor for the LogicalBinaryLayer.
#define ARMNN_DEPRECATED_MSG_REMOVAL_DATE(message, removed_in_release)
IConnectableLayer * AddL2NormalizationLayer(const L2NormalizationDescriptor &desc, const char *name=nullptr)
IConnectableLayer * AddActivationLayer(const ActivationDescriptor &activationDescriptor, const char *name=nullptr)
An OriginsDescriptor for the ConcatLayer.
std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap
IConnectableLayer * AddPooling3dLayer(const Pooling3dDescriptor &pooling3dDescriptor, const char *name=nullptr)
Copyright (c) 2021 ARM Limited and Contributors.
A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer.
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
IConnectableLayer * AddPooling2dLayer(const Pooling2dDescriptor &pooling2dDescriptor, const char *name=nullptr)
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
IConnectableLayer * AddMultiplicationLayer(const char *name=nullptr)
std::vector< BackendOptions > ModelOptions
A PreCompiledDescriptor for the PreCompiledLayer.
IConnectableLayer * AddConvertFp32ToFp16Layer(const char *name=nullptr)
IConnectableLayer * AddInstanceNormalizationLayer(const InstanceNormalizationDescriptor &desc, const char *name=nullptr)
NetworkImpl(const NetworkOptions &networkOptions={})
IConnectableLayer * AddConvolution3dLayer(const Convolution3dDescriptor &convolution3dDescriptor, const char *name=nullptr)
A Pooling2dDescriptor for the Pooling2dLayer.
IConnectableLayer * AddChannelShuffleLayer(const ChannelShuffleDescriptor &channelShuffleDescriptor, const char *name=nullptr)
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
ShapeInferenceMethod
The ShapeInferenceMethod modify how the output shapes are treated.
A ReduceDescriptor for the REDUCE operators.
IConnectableLayer * AddSpaceToBatchNdLayer(const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr)
IConnectableLayer * AddSliceLayer(const SliceDescriptor &sliceDescriptor, const char *name=nullptr)
A MeanDescriptor for the MeanLayer.
std::unique_ptr< void, CompiledBlobDeleter > CompiledBlobPtr
IConnectableLayer * AddGatherLayer(const GatherDescriptor &gatherDescriptor, const char *name=nullptr)
IConnectableLayer * AddPrecompiledLayer(const PreCompiledDescriptor &preCompiledDescriptor, CompiledBlobPtr compiledBlobPtr, const Optional< BackendId > &backend, const char *name=nullptr)
ModelOptions m_ModelOptions
Enable Model Options.
IConnectableLayer * AddPadLayer(const PadDescriptor &padDescriptor, const char *name=nullptr)
A SoftmaxDescriptor for the SoftmaxLayer.
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
IConnectableLayer * AddMaximumLayer(const char *name=nullptr)
IConnectableLayer * AddDetectionPostProcessLayer(const DetectionPostProcessDescriptor &descriptor, const ConstTensor &anchors, const char *name=nullptr)