24.02.1
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_DETAIL_NEACTIVATION_FUNCTION_DETAIL_H
25 #define ARM_COMPUTE_DETAIL_NEACTIVATION_FUNCTION_DETAIL_H
36 template <
typename T,
int S>
70 template <
typename T,
int S>
114 template <
typename T,
int S>
150 template <
typename T,
int S>
182 val = 1 / (1 + std::exp(-val));
189 template <
typename T,
int S>
221 val = std::max(
static_cast<T
>(0), val);
228 template <
typename T,
int S>
262 val = std::min(
alpha, std::max(
static_cast<T
>(0), val));
270 template <
typename T,
int S>
305 val = std::min(
alpha, std::max(
beta, val));
uint8x8_t vadd(const uint8x8_t &a, const uint8x8_t &b)
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
logistic(ActivationLayerInfo act_info)
Construct a Logistic activation object.
void operator()(T &val)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
Lower-Upper Bounded RELU activation object.
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
const ExactType vzero
Vector of zeroes.
float32x4_t vexpq(const float32x4_t &a)
void operator()(ExactType &vval)
Run activation function.
Bounded RELU activation object.
void operator()(T &val)
Run activation function.
float32x2_t vinv(const float32x2_t &a)
lubrelu(ActivationLayerInfo act_info)
Construct a lower-upper bounded RELU activation object.
void operator()(ExactType &vval)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
void operator()(T &val)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
Includes all wrapper headers at once.
uint8x8_t vmin(const uint8x8_t &a, const uint8x8_t &b)
Activation Layer Information class.
Create the appropriate SIMD vector given its type and size in terms of elements.
void operator()(ExactType &vval)
Run activation function.
brelu(ActivationLayerInfo act_info)
Construct a bounded RELU activation object.
Square activation object.
dummy(ActivationLayerInfo act_info)
Construct a dummy activation object.
void operator()(ExactType &vval)
Run activation function.
const ExactType vbeta
Vector of alphas.
const T alpha
Scalar alpha.
uint8x8_t vmul(const uint8x8_t &a, const uint8x8_t &b)
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
const ExactType vzero
Scalar alpha.
linear(ActivationLayerInfo act_info)
Construct a Linear activation object.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
void operator()(T &val)
Run activation function.
void operator()(T &val)
Run activation function.
const T beta
Scalar alpha.
void operator()(ExactType &vval)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
uint8x8_t vmla(const uint8x8_t &a, const uint8x8_t &b, const uint8x8_t &c)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
int8x8_t vneg(const int8x8_t &a)
void operator()(T &val)
Run activation function.
void operator()(ExactType &vval)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
relu(ActivationLayerInfo act_info)
Construct a RELU activation object.
uint8x8_t vmax(const uint8x8_t &a, const uint8x8_t &b)
const ExactType vbeta
Vector of betas.
square(ActivationLayerInfo act_info)
Construct a Square activation object.
const T alpha
Scalar alpha.
Logistic activation object.
Copyright (c) 2017-2024 Arm Limited.
const ExactType vone
Vector of ones.
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
const ExactType valpha
Vector of zeroes.
Linear activation object.
const ExactType valpha
Vector of alphas.
const T beta
Scalar alpha.
typename wrapper::traits::neon_vector< T, S >::tag_type ExactTagType
SIMD vector tag type.
void operator()(T &val)
Run activation function.
void operator()(ExactType &vval)
Run activation function.
typename wrapper::traits::neon_vector< T, S >::type ExactType
SIMD vector type.
uint8x8_t vdup_n(uint8_t value, traits::vector_64_tag)