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)
73 inline arm_compute::ActivationLayerInfo
82 using arm_compute::PoolingType;
84 switch (poolingAlgorithm)
96 using arm_compute::DimensionRoundingType;
106 inline arm_compute::NormType
109 using arm_compute::NormType;
118 inline arm_compute::FullyConnectedLayerInfo
121 arm_compute::FullyConnectedLayerInfo fc_info;
128 switch (resizeMethod)
131 return arm_compute::InterpolationPolicy::BILINEAR;
133 return arm_compute::InterpolationPolicy::NEAREST_NEIGHBOR;
142 if (softmaxDesc.
m_Axis == -1)
149 BOOST_ASSERT(dim != 0);
159 std::set<unsigned int> splitAxis;
161 for (
unsigned int i = 0; i < numSplit; ++i)
163 for (
unsigned int dimIdx = 0; dimIdx < numDimensions; ++dimIdx)
167 splitAxis.insert(dimIdx);
A ViewsDescriptor for the SplitterLayer.
arm_compute::InterpolationPolicy ConvertResizeMethodToAclInterpolationPolicy(ResizeMethod resizeMethod)
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 GetNumDimensions() const
Get the number of dimensions.
arm_compute::NormalizationLayerInfo CreateAclNormalizationLayerInfoForL2Normalization(const armnn::TensorInfo &tensorInfo, armnn::DataLayout dataLayout)
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
NormalizationAlgorithmChannel
arm_compute::NormType ConvertNormalizationAlgorithmChannelToAclNormType(NormalizationAlgorithmChannel channelType)
uint32_t GetNumViews() const
Get the number of views.
Copyright (c) 2020 ARM Limited.
std::set< unsigned int > ComputeSplitAxis(const armnn::SplitterDescriptor &desc, const TensorShape &input)
arm_compute::ActivationLayerInfo::ActivationFunction ConvertActivationFunctionToAclActivationFunction(ActivationFunction armnnFunction)
arm_compute::FullyConnectedLayerInfo ConvertFullyConnectedDescriptorToAclFullyConnectedLayerInfo(const FullyConnectedDescriptor &fullyConnectedDesc)
arm_compute::DimensionRoundingType ConvertOutputShapeRoundingToAclDimensionRoundingType(OutputShapeRounding rounding)
A FullyConnectedDescriptor for the FullyConnectedLayer.
An ActivationDescriptor for the ActivationLayer.
min(a, max(b, input)) ReLu1 & ReLu6.
const uint32_t * GetViewSizes(uint32_t idx) const
Get the view sizes at the int value idx.
float m_A
Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH).
unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor &softmaxDesc, const armnn::TensorInfo &tensor)
unsigned int GetNumDimensions() const
float m_B
Beta lower bound value used by the activation functions. (BoundedReLu, Linear, TanH).
A SoftmaxDescriptor for the SoftmaxLayer.
ActivationFunction m_Function
The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square).
arm_compute::ActivationLayerInfo ConvertActivationDescriptorToAclActivationLayerInfo(const ActivationDescriptor &actDesc)