25 #ifndef AIMATH_F32_DEFAULT
26 #define AIMATH_F32_DEFAULT
1705 void aimath_f32_default_sum_channelwise(
const aitensor_t *x, int8_t channel_axis,
aitensor_t *result);
Definition of the F32 (aif32) data-type.
void aimath_f32_default_binary_crossentropy_sum(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the binary cross entropy between the F32 predicted and the target data using a sum reduct...
void aimath_f32_default_mat_mul_bt(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a and b (transposed)
void aimath_f32_default_zero_tensor(aitensor_t *tensor)
Fills a F32 tensor with zeros.
void aimath_f32_default_mean_channelwise(const aitensor_t *x, int8_t channel_axis, aitensor_t *result)
Sums up all values of a channel of the F32 tensor x.
void aimath_f32_default_d_softsign(const aitensor_t *x, aitensor_t *result)
Calculates the softsign derivative of each element in a F32 tensor.
void aimath_f32_default_init_he_uniform(aitensor_t *tensor)
Fills a F32 tensor with uniformly drawn random numbers within given range, according to He et al.
void aimath_f32_default_sum(const aitensor_t *x, void *result)
Calculates the sum of all elements in a F32 tensor.
void aimath_f32_default_linear(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a and b and adds a vector c to each row.
void aimath_f32_default_init_ones(aitensor_t *tensor)
Fills a F32 tensor with ones.
void aimath_f32_default_norm_squared(const aitensor_t *x, void *result)
Calculates the squared sum of all elements in a F32 tensor.
void aimath_f32_default_linear_bt(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a and b (transposed) and adds a vector c to each ro...
void aimath_f32_default_tensor_add(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise addition of F32 tensors a and b.
void aimath_f32_default_min(const aitensor_t *x, void *result)
Identifies the minimum value in a F32 tensor.
void aimath_f32_default_d_elu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the exponential rectifier (ELU) derivative of each element in a F32 tensor.
void aimath_f32_default_max(const aitensor_t *x, void *result)
Identifies the maximum value in a F32 tensor.
void aimath_f32_default_d_sigmoid(const aitensor_t *sigmoid_x, aitensor_t *result)
Calculates the derivative sigmoid of each element in a F32 tensor.
void aimath_f32_default_mat_mul_atrt(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a matrix multiplication with transposed result of F32 matrices a (transposed) and b.
void aimath_f32_default_sqrt(const aitensor_t *x, aitensor_t *result)
Calculates the element wise square root of a F32 tensor.
void aimath_f32_default_mse_gradients_sum(const aitensor_t *predicted, const aitensor_t *target, aitensor_t *result)
Calculates the gradients of the mean squared error between the F32 predicted and the target data usi...
void aimath_f32_default_transpose_matrix(aitensor_t *x)
Transpose a F32 tensor.
void aimath_f32_default_categorical_crossentropy_mean(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the categorical cross entropy between the F32 predicted and the target data using a mean ...
void aimath_f32_default_d_tanh(const aitensor_t *tanh_x, aitensor_t *result)
Calculates the tanh derivative of each element in a F32 tensor.
void aimath_f32_default_divide(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise division of F32 tensors a and b (Hadamard division)
void aimath_f32_default_tensor_init_uniform(aitensor_t *tensor, float from, float to)
Fills a F32 tensor with random numbers created from a uniform distribution within given range.
void aimath_f32_default_scalar_mul(const void *scalar, const aitensor_t *a, aitensor_t *result)
Performs a scalar multiplication (scaling) of F32 tensor a and a scalar.
void aimath_f32_default_relu(const aitensor_t *x, aitensor_t *result)
Calculates the rectifier (ReLU) value of each element in a F32 tensor.
void aimath_f32_default_softsign(const aitensor_t *x, aitensor_t *result)
Calculates the softsign value of each element in a F32 tensor.
void aimath_f32_default_linear_at(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a (transposed) and b and adds a vector c to each ro...
void aimath_f32_default_transpose_vector(aitensor_t *vector)
Transposes a F32 vector.
void aimath_f32_default_init_zeros(aitensor_t *tensor)
Fills a F32 tensor with zeros.
void aimath_f32_default_elu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the exponential rectifier (ELU) value of each element in a F32 tensor.
void aimath_f32_default_mat_mul(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a and b.
void aimath_f32_default_mse_gradients_mean(const aitensor_t *predicted, const aitensor_t *target, aitensor_t *result)
Calculates the gradients of the mean squared error between the F32 predicted and the target data usi...
void aimath_f32_default_scale_by_batch_size(const aitensor_t *a, aitensor_t *result)
Scales a F32 tensor by batch size (size of first dimension)
void aimath_f32_default_mse_loss_sum(const aitensor_t *predicted, const aitensor_t *target, void *result)
Calculates the mean squared error between the F32 predicted and the target data using a sum reductio...
void aimath_f32_default_categorical_crossentropy_mean_sparse8(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the categorical Cross-Entropy between the F32 predicted data and the U8 target data in s...
void aimath_f32_default_mse_loss_mean(const aitensor_t *predicted, const aitensor_t *target, void *result)
Calculates the mean squared error between the F32 predicted and the target data using a mean reducti...
void aimath_f32_default_d_leaky_relu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the leaky rectifier (leaky ReLU) derivative of each element in a F32 tensor.
float aimath_f32_default_expf_fast(const float x)
Fast approximation of the exponential function.
void aimath_f32_default_init_glorot_uniform_cdim(aitensor_t *tensor, int8_t cin_axis, int8_t cout_axis)
Fills a F32 tensor with random numbers uniformly within given range, according to Glorot et al.
void aimath_f32_default_sigmoid(const aitensor_t *x, aitensor_t *result)
Calculates the sigmoid of each element in a F32 tensor.
void aimath_f32_default_copy_tensor(const aitensor_t *from, aitensor_t *to)
Performs an element wise copy of F32 tensors.
void aimath_f32_default_categorical_crossentropy_sum_sparse8(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the categorical Cross-Entropy between the F32 predicted data and the U8 target data in s...
void aimath_f32_default_init_glorot_uniform(aitensor_t *tensor)
Fills a F32 tensor with random numbers uniformly within given range, according to Glorot et al.
void aimath_f32_default_d_relu(const aitensor_t *x, aitensor_t *result)
Calculates the rectifier (ReLU) derivative of each element in a F32 tensor.
void aimath_f32_default_categorical_crossentropy_sum(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the categorical cross entropy between the F32 predicted and the target data using a sum r...
void aimath_f32_default_tanh(const aitensor_t *x, aitensor_t *result)
Calculates the tanh of each element in a F32 tensor.
void aimath_f32_default_scalar_add(const void *scalar, const aitensor_t *a, aitensor_t *result)
Performs an element wise addition of a scalar to a F32 tensor.
void aimath_f32_default_multiply(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise multiplication of F32 tensors a and b (Hadamard product)
void aimath_f32_default_softmax(const aitensor_t *x, aitensor_t *result)
Calculates the softmax value of each row of a F32 matrix.
void aimath_f32_default_tensor_sub_sparse8(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a subtraction between a F32 matrix a and a U8 sparse matrix b.
void aimath_f32_default_linear_atrt(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication with transposed result of F32 matrices a (transposed) and b and add...
void aimath_f32_default_mat_mul_at(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a matrix multiplication of F32 matrices a (transposed) and b.
void aimath_f32_default_binary_crossentropy_mean(const aitensor_t *predicted_data, const aitensor_t *target_data, void *result)
Calculates the binary cross entropy between the F32 predicted and the target data using a mean reduc...
void aimath_f32_default_tensor_sub(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a element wise subtraction of F32 tensors a and b.
void aimath_f32_default_exponential_moving_average(const aitensor_t *new_data, const void *momentum, aitensor_t *average)
Perform an exponential moving average.
void aimath_f32_default_leaky_relu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the leaky rectifier (leaky ReLU) value of each element in a F32 tensor.
void aimath_f32_default_variance_channelwise(const aitensor_t *x, int8_t channel_axis, const aitensor_t *means, aitensor_t *result)
Calculate the channel-wise variances of the F32 tensor x.
void aimath_f32_default_init_he_uniform_cdim(aitensor_t *tensor, int8_t cout_axis)
Fills a F32 tensor with uniformly drawn random numbers within given range, according to He et al.
A tensor in AIfES.
Definition: aifes_math.h:89