10 #include <arm_compute/core/Types.h> 12 #include <boost/assert.hpp> 17 inline arm_compute::NormalizationLayerInfo
22 const unsigned int depth = tensorInfo.
GetShape()[depthDimension];
35 const uint32_t normSize = depth * 2u + 1u;
39 const float alpha = 1.0f;
42 const float kappa = 0.0f;
45 const float beta = 0.5f;
47 return arm_compute::NormalizationLayerInfo(arm_compute::NormType::CROSS_MAP, normSize, alpha, beta, kappa,
false);
55 switch (armnnFunction)
72 inline arm_compute::ActivationLayerInfo
81 using arm_compute::PoolingType;
83 switch (poolingAlgorithm)
95 using arm_compute::DimensionRoundingType;
105 inline arm_compute::NormType
108 using arm_compute::NormType;
117 inline arm_compute::FullyConnectedLayerInfo
120 arm_compute::FullyConnectedLayerInfo fc_info;
127 switch (resizeMethod)
130 return arm_compute::InterpolationPolicy::BILINEAR;
132 return arm_compute::InterpolationPolicy::NEAREST_NEIGHBOR;
141 if (softmaxDesc.
m_Axis == -1)
148 BOOST_ASSERT(dim != 0);
158 std::set<unsigned int> splitAxis;
160 for (
unsigned int i = 0; i < numSplit; ++i)
162 for (
unsigned int dimIdx = 0; dimIdx < numDimensions; ++dimIdx)
166 splitAxis.insert(dimIdx);
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH).
unsigned int GetNumDimensions() const
arm_compute::ActivationLayerInfo ConvertActivationDescriptorToAclActivationLayerInfo(const ActivationDescriptor &actDesc)
arm_compute::InterpolationPolicy ConvertResizeMethodToAclInterpolationPolicy(ResizeMethod resizeMethod)
arm_compute::FullyConnectedLayerInfo ConvertFullyConnectedDescriptorToAclFullyConnectedLayerInfo(const FullyConnectedDescriptor &fullyConnectedDesc)
std::set< unsigned int > ComputeSplitAxis(const armnn::SplitterDescriptor &desc, const TensorShape &input)
An ActivationDescriptor for the ActivationLayer.
arm_compute::ActivationLayerInfo::ActivationFunction ConvertActivationFunctionToAclActivationFunction(ActivationFunction armnnFunction)
arm_compute::NormType ConvertNormalizationAlgorithmChannelToAclNormType(NormalizationAlgorithmChannel channelType)
arm_compute::NormalizationLayerInfo CreateAclNormalizationLayerInfoForL2Normalization(const armnn::TensorInfo &tensorInfo, armnn::DataLayout dataLayout)
A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc.
uint32_t GetNumDimensions() const
Get the number of dimensions.
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
A FullyConnectedDescriptor for the FullyConnectedLayer.
arm_compute::DimensionRoundingType ConvertOutputShapeRoundingToAclDimensionRoundingType(OutputShapeRounding rounding)
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
const uint32_t * GetViewSizes(uint32_t idx) const
Get the view sizes at the int value idx.
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square).
A SoftmaxDescriptor for the SoftmaxLayer.
unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor &softmaxDesc, const armnn::TensorInfo &tensor)
NormalizationAlgorithmChannel
int m_Axis
Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...
const TensorShape & GetShape() const
arm_compute::PoolingType ConvertPoolingAlgorithmToAclPoolingType(PoolingAlgorithm poolingAlgorithm)
uint32_t GetNumViews() const
Get the number of views.