58 struct NEConvolutionLayerFunctions
60 using GenericConvolutionLayer = NEConvolutionLayer;
61 using GEMMConvolutionLayer = NEGEMMConvolutionLayer;
62 using DirectConvolutionLayer = NEDirectConvolutionLayer;
63 using WinogradConvolutionLayer = NEWinogradConvolutionLayer;
67 struct NEEltwiseFunctions
69 using Addition = NEArithmeticAddition;
70 using Subtraction = NEArithmeticSubtraction;
71 using Multiplication = NEPixelWiseMultiplication;
72 using Maximum = NEElementwiseMax;
73 using Division = NEElementwiseDivision;
77 struct NEUnaryEltwiseFunctions
83 struct NEFusedLayerTypes
87 using FuseBatchNormalization = NEFuseBatchNormalization;
95 validate_node<NETargetInfo>(node, 1 , 1 );
105 auto func = std::make_unique<NENormalizationLayer>(
get_memory_manager(ctx, NETargetInfo::TargetType));
106 func->configure(input, output, norm_info);
111 <<
" Type: " << node.type()
112 <<
" Target: " << NETargetInfo::TargetType
113 <<
" Data Type: " << input->info()->data_type()
114 <<
" Input shape: " << input->info()->tensor_shape()
115 <<
" Output shape: " << output->info()->tensor_shape()
116 <<
" Normalization info: " << norm_info.type()
119 return std::move(func);
133 case NodeType::ActivationLayer:
134 return detail::create_activation_layer<NEActivationLayer, NETargetInfo>(*polymorphic_downcast<ActivationLayerNode *>(node));
135 case NodeType::ArgMinMaxLayer:
136 return detail::create_arg_min_max_layer<NEArgMinMaxLayer, NETargetInfo>(*polymorphic_downcast<ArgMinMaxLayerNode *>(node));
137 case NodeType::BatchNormalizationLayer:
138 return detail::create_batch_normalization_layer<NEBatchNormalizationLayer, NETargetInfo>(*polymorphic_downcast<BatchNormalizationLayerNode *>(node));
139 case NodeType::ChannelShuffleLayer:
140 return detail::create_channel_shuffle_layer<NEChannelShuffleLayer, NETargetInfo>(*polymorphic_downcast<ChannelShuffleLayerNode *>(node));
141 case NodeType::ConvolutionLayer:
142 return detail::create_convolution_layer<NEConvolutionLayerFunctions, NETargetInfo>(*polymorphic_downcast<ConvolutionLayerNode *>(node), ctx);
143 case NodeType::DepthToSpaceLayer:
144 return detail::create_depth_to_space_layer<NEDepthToSpaceLayer, NETargetInfo>(*polymorphic_downcast<DepthToSpaceLayerNode *>(node));
145 case NodeType::DeconvolutionLayer:
146 return detail::create_deconvolution_layer<NEDeconvolutionLayer, NETargetInfo>(*polymorphic_downcast<DeconvolutionLayerNode *>(node), ctx);
147 case NodeType::ConcatenateLayer:
148 return detail::create_concatenate_layer<NEConcatenateLayer, NETargetInfo>(*polymorphic_downcast<ConcatenateLayerNode *>(node));
149 case NodeType::DepthwiseConvolutionLayer:
150 return detail::create_depthwise_convolution_layer<NEDepthwiseConvolutionLayer, NETargetInfo>(*polymorphic_downcast<DepthwiseConvolutionLayerNode *>(node));
151 case NodeType::DequantizationLayer:
152 return detail::create_dequantization_layer<NEDequantizationLayer, NETargetInfo>(*polymorphic_downcast<DequantizationLayerNode *>(node));
153 case NodeType::DetectionOutputLayer:
154 return detail::create_detection_output_layer<CPPDetectionOutputLayer, NETargetInfo>(*polymorphic_downcast<DetectionOutputLayerNode *>(node));
155 case NodeType::DetectionPostProcessLayer:
156 return detail::create_detection_post_process_layer<NEDetectionPostProcessLayer, NETargetInfo>(*polymorphic_downcast<DetectionPostProcessLayerNode *>(node));
157 case NodeType::EltwiseLayer:
158 return detail::create_eltwise_layer<NEEltwiseFunctions, NETargetInfo>(*polymorphic_downcast<EltwiseLayerNode *>(node));
159 case NodeType::UnaryEltwiseLayer:
160 return detail::create_unary_eltwise_layer<NEUnaryEltwiseFunctions, NETargetInfo>(*polymorphic_downcast<UnaryEltwiseLayerNode *>(node));
161 case NodeType::FlattenLayer:
162 return detail::create_flatten_layer<NEFlattenLayer, NETargetInfo>(*polymorphic_downcast<FlattenLayerNode *>(node));
163 case NodeType::FullyConnectedLayer:
164 return detail::create_fully_connected_layer<NEFullyConnectedLayer, NETargetInfo>(*polymorphic_downcast<FullyConnectedLayerNode *>(node), ctx);
165 case NodeType::FusedConvolutionBatchNormalizationLayer:
166 return detail::create_fused_convolution_batch_normalization_layer<NEFusedLayerTypes, NETargetInfo>(*polymorphic_downcast<FusedConvolutionBatchNormalizationNode *>(node), ctx);
167 case NodeType::FusedDepthwiseConvolutionBatchNormalizationLayer:
168 return detail::create_fused_depthwise_convolution_batch_normalization_layer<NEFusedLayerTypes, NETargetInfo>(*polymorphic_downcast<FusedDepthwiseConvolutionBatchNormalizationNode *>(node), ctx);
169 case NodeType::L2NormalizeLayer:
170 return detail::create_l2_normalize_layer<NEL2NormalizeLayer, NETargetInfo>(*polymorphic_downcast<L2NormalizeLayerNode *>(node), ctx);
171 case NodeType::NormalizationLayer:
173 case NodeType::PadLayer:
174 return detail::create_pad_layer<NEPadLayer, NETargetInfo>(*polymorphic_downcast<PadLayerNode *>(node));
175 case NodeType::PermuteLayer:
176 return detail::create_permute_layer<NEPermute, NETargetInfo>(*polymorphic_downcast<PermuteLayerNode *>(node));
177 case NodeType::PoolingLayer:
178 return detail::create_pooling_layer<NEPoolingLayer, NETargetInfo>(*polymorphic_downcast<PoolingLayerNode *>(node));
179 case NodeType::PReluLayer:
180 return detail::create_prelu_layer<NEPReluLayer, NETargetInfo>(*polymorphic_downcast<PReluLayerNode *>(node));
181 case NodeType::PrintLayer:
182 return detail::create_print_layer<NETargetInfo>(*polymorphic_downcast<PrintLayerNode *>(node));
183 case NodeType::PriorBoxLayer:
184 return detail::create_priorbox_layer<NEPriorBoxLayer, NETargetInfo>(*polymorphic_downcast<PriorBoxLayerNode *>(node));
185 case NodeType::QuantizationLayer:
186 return detail::create_quantization_layer<NEQuantizationLayer, NETargetInfo>(*polymorphic_downcast<QuantizationLayerNode *>(node));
187 case NodeType::ReductionOperationLayer:
188 return detail::create_reduction_operation_layer<NEReductionOperation, NETargetInfo>(*polymorphic_downcast<ReductionLayerNode *>(node), ctx);
189 case NodeType::ReorgLayer:
190 return detail::create_reorg_layer<NEReorgLayer, NETargetInfo>(*polymorphic_downcast<ReorgLayerNode *>(node));
191 case NodeType::ReshapeLayer:
192 return detail::create_reshape_layer<NEReshapeLayer, NETargetInfo>(*polymorphic_downcast<ReshapeLayerNode *>(node));
193 case NodeType::ResizeLayer:
194 return detail::create_resize_layer<NEScale, NETargetInfo>(*polymorphic_downcast<ResizeLayerNode *>(node));
195 case NodeType::SliceLayer:
196 return detail::create_slice_layer<NESlice, NETargetInfo>(*polymorphic_downcast<SliceLayerNode *>(node));
197 case NodeType::SoftmaxLayer:
198 return detail::create_softmax_layer<NESoftmaxLayer, NETargetInfo>(*polymorphic_downcast<SoftmaxLayerNode *>(node), ctx);
199 case NodeType::StackLayer:
200 return detail::create_stack_layer<NEStackLayer, NETargetInfo>(*polymorphic_downcast<StackLayerNode *>(node));
201 case NodeType::StridedSliceLayer:
202 return detail::create_strided_slice_layer<NEStridedSlice, NETargetInfo>(*polymorphic_downcast<StridedSliceLayerNode *>(node));
Normalization Layer node.
Normalization Layer Information class.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
NEElementwiseUnaryLayer< ElementWiseUnary::EXP > NEExpLayer
decltype(strategy::transforms) typedef type
Interface for CPU tensor.
Includes all the Arm® Neon™ functions at once.
#define ARM_COMPUTE_LOG_GRAPH_INFO(x)
Copyright (c) 2017-2021 Arm Limited.
std::unique_ptr< IFunction > create_normalization_layer< NENormalizationLayer, NETargetInfo >(NormalizationLayerNode &node, GraphContext &ctx)
Basic implementation of the tensor interface.
std::shared_ptr< IMemoryManager > get_memory_manager(GraphContext &ctx, Target target)
Returns the memory manager for a given target.
virtual NodeType type() const =0
Returns node's type.