23.05
|
Activation Layer Information class. More...
#include <Types.h>
Public Types | |
enum | ActivationFunction { LOGISTIC, TANH, RELU, BOUNDED_RELU, LU_BOUNDED_RELU, LEAKY_RELU, SOFT_RELU, ELU, ABS, SQUARE, SQRT, LINEAR, IDENTITY, HARD_SWISH, SWISH, GELU } |
Available activation functions. More... | |
using | LookupTable256 = std::array< qasymm8_t, 256 > |
Lookup table. More... | |
Public Member Functions | |
ActivationLayerInfo ()=default | |
ActivationLayerInfo (ActivationFunction f, float a=0.0f, float b=0.0f) | |
Default Constructor. More... | |
ActivationFunction | activation () const |
Get the type of activation function. More... | |
float | a () const |
Get the alpha value. More... | |
float | b () const |
Get the beta value. More... | |
bool | enabled () const |
Check if initialised. More... | |
Static Public Member Functions | |
static bool | is_lut_supported (ActivationFunction act_func, DataType data_type) |
using LookupTable256 = std::array<qasymm8_t, 256> |
|
strong |
Available activation functions.
Definition at line 1663 of file Types.h.
|
default |
|
inline |
Default Constructor.
[in] | f | The activation function to use. |
[in] | a | (Optional) The alpha parameter used by some activation functions (ActivationFunction::BOUNDED_RELU, ActivationFunction::LU_BOUNDED_RELU, ActivationFunction::LINEAR, ActivationFunction::TANH). |
[in] | b | (Optional) The beta parameter used by some activation functions (ActivationFunction::LINEAR, ActivationFunction::LU_BOUNDED_RELU, ActivationFunction::TANH). |
Definition at line 1694 of file Types.h.
|
inline |
Get the alpha value.
Definition at line 1704 of file Types.h.
Referenced by arm_compute::test::validation::reference::activation_layer(), ClElementwiseKernel::ClElementwiseKernel(), ClActivationKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClIndirectConv2dKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClDirectConv2dKernel::configure(), ClMulKernel::configure(), CLBatchNormalizationLayerKernel::configure(), ClComplexMulKernel::configure(), arm_compute::cpu::fp_neon_activation_impl(), arm_compute::get_quantized_activation_min_max(), arm_compute::quantization::get_quantized_asymmetric_output_min_max(), ClTemplateActivation::get_tag_lut(), arm_compute::utils::info_helpers::is_relu6(), arm_compute::assembly_utils::map_to_arm_gemm_activation(), arm_compute::cpu::neon_qasymm8_activation(), arm_compute::cpu::neon_qasymm8_signed_activation(), arm_compute::cpu::neon_qsymm16_activation(), arm_compute::operator<<(), arm_compute::cpu::sve2_qasymm8_activation(), arm_compute::cpu::sve2_qasymm8_signed_activation(), arm_compute::cpu::sve2_qsymm16_activation(), arm_compute::cpu::sve_fp32_activation(), and ClGemmConv2d::validate().
|
inline |
Get the type of activation function.
Definition at line 1699 of file Types.h.
Referenced by arm_compute::test::validation::reference::activation_layer(), ClElementwiseKernel::ClElementwiseKernel(), ClActivationKernel::configure(), CpuActivationKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClIndirectConv2dKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClDirectConv2dKernel::configure(), ClMulKernel::configure(), CLBatchNormalizationLayerKernel::configure(), ClComplexMulKernel::configure(), ClGemmConv2d::configure(), arm_compute::graph::backends::detail::create_batch_normalization_layer(), arm_compute::graph::backends::detail::create_convolution_layer(), arm_compute::graph::backends::detail::create_depthwise_convolution_layer(), arm_compute::graph::backends::detail::create_fused_convolution_batch_normalization_layer(), arm_compute::graph::backends::detail::create_fused_depthwise_convolution_batch_normalization_layer(), arm_compute::cpu::fp32_neon_batch_normalization(), arm_compute::cpu::fp_neon_activation_impl(), arm_compute::get_quantized_activation_min_max(), arm_compute::quantization::get_quantized_asymmetric_output_min_max(), ClTemplateActivation::get_tag_lut(), arm_compute::utils::info_helpers::is_relu(), arm_compute::utils::info_helpers::is_relu6(), arm_compute::assembly_utils::map_to_arm_gemm_activation(), arm_compute::cpu::neon_qasymm8_activation(), arm_compute::cpu::neon_qasymm8_signed_activation(), arm_compute::cpu::neon_qsymm16_activation(), arm_compute::operator<<(), arm_compute::cpu::sve2_qasymm8_activation(), arm_compute::cpu::sve2_qasymm8_signed_activation(), arm_compute::cpu::sve2_qsymm16_activation(), arm_compute::cpu::sve_fp32_activation(), arm_compute::to_string(), ClFullyConnected::validate(), CpuFullyConnected::validate(), ClGemmConv2d::validate(), and DotGraphVisitor::visit().
|
inline |
Get the beta value.
Definition at line 1709 of file Types.h.
Referenced by arm_compute::test::validation::reference::activation_layer(), ClElementwiseKernel::ClElementwiseKernel(), ClActivationKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClIndirectConv2dKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClDirectConv2dKernel::configure(), ClMulKernel::configure(), CLBatchNormalizationLayerKernel::configure(), ClComplexMulKernel::configure(), arm_compute::cpu::fp_neon_activation_impl(), arm_compute::get_quantized_activation_min_max(), arm_compute::quantization::get_quantized_asymmetric_output_min_max(), ClTemplateActivation::get_tag_lut(), arm_compute::utils::info_helpers::is_relu6(), arm_compute::assembly_utils::map_to_arm_gemm_activation(), arm_compute::cpu::neon_qasymm8_activation(), arm_compute::cpu::neon_qasymm8_signed_activation(), arm_compute::cpu::neon_qsymm16_activation(), arm_compute::operator<<(), arm_compute::cpu::sve2_qasymm8_activation(), arm_compute::cpu::sve2_qasymm8_signed_activation(), arm_compute::cpu::sve2_qsymm16_activation(), arm_compute::cpu::sve_fp32_activation(), and ClGemmConv2d::validate().
|
inline |
Check if initialised.
Definition at line 1714 of file Types.h.
References arm_compute::test::validation::data_type, and arm_compute::QASYMM8.
Referenced by arm_compute::test::validation::reference::batch_normalization_layer(), ClElementwiseKernel::ClElementwiseKernel(), ClGemmMatrixMultiplyNativeKernel::configure(), ClDirectConv2d::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClIndirectConv2dKernel::configure(), ClWinogradOutputTransformKernel::configure(), FusedDepthwiseConvolutionBatchNormalizationFunction< TargetInfo, FusedLayerTypes >::configure(), NEBatchNormalizationLayerKernel::configure(), ClDirectConv2dKernel::configure(), CpuGemmDirectConv2d::configure(), ClMulKernel::configure(), CpuWinogradConv2d::configure(), CpuDirectConv2d::configure(), CpuDirectConv3d::configure(), CLBatchNormalizationLayerKernel::configure(), NEFFTConvolutionLayer::configure(), ClComplexMulKernel::configure(), ClGemmConv2d::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), arm_compute::graph::backends::detail::create_batch_normalization_layer(), arm_compute::graph::backends::detail::create_convolution_layer(), arm_compute::graph::backends::detail::create_depthwise_convolution_layer(), arm_compute::graph::backends::detail::create_fused_convolution_batch_normalization_layer(), arm_compute::graph::backends::detail::create_fused_depthwise_convolution_batch_normalization_layer(), arm_compute::cpu::fp32_neon_batch_normalization(), arm_compute::quantization::get_quantized_asymmetric_output_min_max(), arm_compute::utils::info_helpers::is_relu(), arm_compute::utils::info_helpers::is_relu6(), arm_compute::operator<<(), CpuActivationKernel::run_op(), ClMulKernel::run_op(), arm_compute::to_string(), CpuSub::validate(), CpuAdd::validate(), ClDirectConv2d::validate(), CpuMul::validate(), CpuDirectConv2d::validate(), NEElementwiseMax::validate(), CpuDirectConv3d::validate(), ClFullyConnected::validate(), CpuFullyConnected::validate(), CpuComplexMul::validate(), CpuGemm::validate(), ClGemmConv2d::validate(), NEFFTConvolutionLayer::validate(), CpuGemmLowpMatrixMultiplyCore::validate(), CLFFTConvolutionLayer::validate(), NEElementwiseMin::validate(), ClSaturatedArithmeticKernel::validate(), ClArithmeticKernel::validate(), NEElementwiseSquaredDiff::validate(), NEElementwiseDivision::validate(), NEElementwisePower::validate(), and DotGraphVisitor::visit().
|
inlinestatic |
Definition at line 1756 of file Types.h.
References ARM_COMPUTE_UNUSED, ActivationLayerInfo::IDENTITY, arm_compute::QASYMM8, arm_compute::qasymm8_hard_swish(), arm_compute::qasymm8_leaky_relu(), arm_compute::qasymm8_logistic(), arm_compute::QASYMM8_SIGNED, arm_compute::qasymm8_signed_hard_swish(), and arm_compute::qasymm8_signed_logistic().
Referenced by CpuActivationKernel::configure().