25 #ifndef AIMATH_CNN_F32_DEFAULT_H
26 #define AIMATH_CNN_F32_DEFAULT_H
38 #define AIFES_PADDING_SAME 0xFFFF
39 #define AIFES_PADDING_VALID 0
72 const uint16_t stride[2],
73 const uint16_t dilation[2],
74 const int16_t padding[2][2],
77 const uint8_t rotated_kernel,
78 const int16_t *input_use_dims,
79 const int16_t *output_use_dims,
80 const int16_t *kernel_use_dims,
113 const uint16_t stride[2],
114 const uint16_t dilation[2],
115 const int16_t padding[2][2],
118 const uint8_t rotated_kernel,
119 const int16_t *input_use_dims,
120 const int16_t *output_use_dims,
121 const int16_t *kernel_use_dims,
146 const uint16_t stride[2],
147 const uint16_t dilation[2],
148 const uint16_t padding[2],
177 const uint16_t stride[2],
178 const uint16_t dilation[2],
179 const uint16_t padding[2],
208 const uint16_t stride[2],
209 const uint16_t dilation[2],
210 const uint16_t padding[2],
239 const uint16_t stride[2],
240 const uint16_t dilation[2],
241 const uint16_t padding[2],
242 const uint16_t output_padding[2],
277 const uint16_t pool_size[2],
278 const uint16_t stride[2],
279 const uint16_t padding[2],
282 uint32_t *max_locations,
304 const uint16_t pool_size[2],
305 const uint16_t stride[2],
306 const uint16_t padding[2],
309 const uint32_t *max_locations,
void aimath_f32_default_maxpool2d_fwd(const aitensor_t *input, const uint16_t pool_size[2], const uint16_t stride[2], const uint16_t padding[2], int8_t channel_axis, void *work_space, uint32_t *max_locations, aitensor_t *output)
2D max-pooling on 4D F32 tensors
void aimath_f32_default_pad_zeros(const aitensor_t *x, const uint16_t(*padding)[2], aitensor_t *result)
Pads a F32 tensor with zeros.
void aimath_f32_default_d_batch_norm(const aitensor_t *x_in, int8_t axis, const aitensor_t *means, const aitensor_t *vars, const aitensor_t *betas, const aitensor_t *gammas, const aitensor_t *delta_out, const void *eps, aitensor_t *delta_in, aitensor_t *d_betas, aitensor_t *d_gammas)
Calculates the gradients of Batch Normalization with respect to betas, gammas and the input in F32 d...
void aimath_f32_default_conv_transpose2d_add(const aitensor_t *input, const uint16_t stride[2], const uint16_t dilation[2], const int16_t padding[2][2], const aitensor_t *kernel, const void *bias, const uint8_t rotated_kernel, const int16_t *input_use_dims, const int16_t *output_use_dims, const int16_t *kernel_use_dims, aitensor_t *output)
Performs 2D transposed convolution (or deconvolution) on slices of 4D F32 tensors and adds an option...
void aimath_f32_default_conv2d_bwd_full(const aitensor_t *delta_out, const uint16_t stride[2], const uint16_t dilation[2], const uint16_t padding[2], const aitensor_t *weights, int8_t channel_axis, void *work_space, aitensor_t *delta_in)
Calculates the gradients of the Conv2D layer with respect to the weights in F32 data type.
void aimath_f32_default_maxpool2d_bwd(const aitensor_t *delta_out, const uint16_t pool_size[2], const uint16_t stride[2], const uint16_t padding[2], int8_t channel_axis, void *work_space, const uint32_t *max_locations, aitensor_t *delta_in)
Calculates the gradients of the MaxPool2D layer with respect to the input in F32 data type.
void aimath_f32_default_batch_norm(const aitensor_t *x, int8_t axis, const aitensor_t *means, const aitensor_t *variances, const aitensor_t *offsets, const aitensor_t *scales, const void *eps, aitensor_t *result)
Batch Normalization on F32 tensors.
void aimath_f32_default_conv2d_add(const aitensor_t *input, const uint16_t stride[2], const uint16_t dilation[2], const int16_t padding[2][2], const aitensor_t *kernel, const void *bias, const uint8_t rotated_kernel, const int16_t *input_use_dims, const int16_t *output_use_dims, const int16_t *kernel_use_dims, aitensor_t *output)
Performs 2D convolution on slices of 4D F32 tensors and adds an optional bias.
void aimath_f32_default_conv2d_bwd(const aitensor_t *x_in, const uint16_t stride[2], const uint16_t dilation[2], const uint16_t padding[2], const aitensor_t *delta_out, int8_t channel_axis, void *work_space, aitensor_t *d_weights)
Calculates the gradients of the Conv2D layer with respect to the weights in F32 data type.
void aimath_f32_default_conv_transpose2d_fwd(const aitensor_t *input, const uint16_t stride[2], const uint16_t dilation[2], const uint16_t padding[2], const uint16_t output_padding[2], const aitensor_t *weights, const aitensor_t *bias, int8_t channel_axis, void *work_space, aitensor_t *output)
Performs 2D transposed convolutions with the given 4D F32 tensors and adds a bias (forward pass of t...
void aimath_f32_default_conv2d_fwd(const aitensor_t *input, const uint16_t stride[2], const uint16_t dilation[2], const uint16_t padding[2], const aitensor_t *weights, const aitensor_t *bias, int8_t channel_axis, void *work_space, aitensor_t *output)
Performs 2D convolutions with the given 4D F32 tensors and adds a bias (forward pass of the Conv2D l...
Definition of the F32 (aif32) data-type.
Math functions for F32 data type, default implementation.
A tensor in AIfES.
Definition: aifes_math.h:89