SHL 2.2.x
Loading...
Searching...
No Matches
csi_nn.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "csinn_data_structure.h"
#include "csinn_runtime.h"
#include "shl_debug.h"
#include "shl_memory.h"

Go to the source code of this file.

Functions

int csinn_conv2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution initialization function. More...
 
int csinn_conv2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution function. More...
 
int csinn_depthwise_conv2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional depthwise convolution initialization function. More...
 
int csinn_depthwise_conv2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional depthwise convolution function. More...
 
int csinn_group_conv2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional group convolution initialization function. More...
 
int csinn_group_conv2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional group convolution function. More...
 
int csinn_conv2d_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution and ReLU fusion initialization function. More...
 
int csinn_conv2d_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution and ReLU fusion function. More...
 
int csinn_depthwise_conv2d_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional depthwise convolution and ReLU fusion initialization function. More...
 
int csinn_depthwise_conv2d_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional depthwise convolution and ReLU fusion function. More...
 
int csinn_conv2d_relu6_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution and ReLU6 fusion initialization function. More...
 
int csinn_conv2d_relu6 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional convolution and ReLU6 fusion function. More...
 
int csinn_deconv2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional deconvolution initialization function. More...
 
int csinn_deconv2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv2d_params *params)
 Two-dimensional deconvolution function. More...
 
int csinn_conv3d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv3d_params *params)
 Three-dimensional convolution initialization function. More...
 
int csinn_conv3d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv3d_params *params)
 Three-dimensional convolution function. More...
 
int csinn_deconv3d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv3d_params *params)
 Three-dimensional deconvolution initialization function. More...
 
int csinn_deconv3d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv3d_params *params)
 Three-dimensional deconvolution function. More...
 
int csinn_fsmn_init (struct csinn_tensor *frame, struct csinn_tensor *l_filter, struct csinn_tensor *r_filter, struct csinn_tensor *frame_sequence, struct csinn_tensor *frame_counter, struct csinn_tensor *output, struct csinn_fsmn_params *params)
 Feedforward Sequential Memory Network initialization function. More...
 
int csinn_fsmn (struct csinn_tensor *frame, struct csinn_tensor *l_filter, struct csinn_tensor *r_filter, struct csinn_tensor *frame_sequence, struct csinn_tensor *frame_counter, struct csinn_tensor *output, struct csinn_fsmn_params *params)
 Feedforward Sequential Memory Network function. More...
 
int csinn_fullyconnected_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weights, struct csinn_tensor *bias, struct csinn_fc_params *params)
 Fully Connected initialization function. More...
 
int csinn_fullyconnected (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weights, struct csinn_tensor *bias, struct csinn_fc_params *params)
 Fully Connected function. More...
 
int csinn_fullyconnected_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weights, struct csinn_tensor *bias, struct csinn_fc_params *params)
 Fully Connected and ReLU fusion initialization function. More...
 
int csinn_fullyconnected_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weights, struct csinn_tensor *bias, struct csinn_fc_params *params)
 Fully Connected and ReLU fusion function. More...
 
int csinn_maxpool2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional max pooling initialization function. More...
 
int csinn_maxpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional max pooling function. More...
 
int csinn_maxpool3d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional max pooling initialization function. More...
 
int csinn_maxpool3d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional max pooling function. More...
 
int csinn_global_maxpool2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional global max pooling initialization function. More...
 
int csinn_global_maxpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional global max pooling function. More...
 
int csinn_avgpool2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional average pooling initialization function. More...
 
int csinn_avgpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional average pooling function. More...
 
int csinn_avgpool3d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional average pooling initialization function. More...
 
int csinn_avgpool3d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional average pooling function. More...
 
int csinn_global_avgpool2d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional global average pooling initialization function. More...
 
int csinn_global_avgpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional global average pooling function. More...
 
int csinn_l2pool_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 L2 pooling initialization function. More...
 
int csinn_l2pool (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 L2 pooling function. More...
 
int csinn_pool_with_argmax_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Pooling and argmax fusion initialization function. More...
 
int csinn_pool_with_argmax (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Pooling and argmax fusion function. More...
 
int csinn_maxpool2d_locat_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Max pooling and with locating information initialization function. More...
 
int csinn_maxpool2d_locat (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Max pooling and with locating information function. More...
 
int csinn_unpooling_init (struct csinn_tensor *input, struct csinn_tensor *mask, struct csinn_tensor *output, struct csinn_unpooling_params *params)
 Unpooling initialization function. More...
 
int csinn_unpooling (struct csinn_tensor *input, struct csinn_tensor *mask, struct csinn_tensor *output, struct csinn_unpooling_params *params)
 Unpooling function. More...
 
int csinn_roi_align_init (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_roi_align_params *params)
 ROI align initialization function. More...
 
int csinn_roi_align (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_roi_align_params *params)
 ROI align function. More...
 
int csinn_negative_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Negative initialization function. More...
 
int csinn_negative (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate negtive for each element of input tensor. More...
 
int csinn_floor_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Floor initialization function. More...
 
int csinn_floor (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate floor for each element of input tensor. More...
 
int csinn_ceil_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Ceil initialization function. More...
 
int csinn_ceil (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate ceil for each element of input tensor. More...
 
int csinn_sign_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Sign initialization function. More...
 
int csinn_sign (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate sign for each element of input tensor. More...
 
int csinn_trunc_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Trunc initialization function. More...
 
int csinn_trunc (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate trunc for each element of input tensor. More...
 
int csinn_round_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Round initialization function. More...
 
int csinn_round (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate round for each element of input tensor. More...
 
int csinn_abs_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Abs initialization function. More...
 
int csinn_abs (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate abs for each element of input tensor. More...
 
int csinn_isnan_bool_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Isnan bool initialization function. More...
 
int csinn_isnan_bool (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate isnan bool for each element of input tensor. More...
 
int csinn_exp_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Exp initialization function. More...
 
int csinn_exp (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate exp for each element of input tensor. More...
 
int csinn_expm1_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Expm1 initialization function. More...
 
int csinn_expm1 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate expm1 for each element of input tensor. More...
 
int csinn_sin_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 sin initialization function More...
 
int csinn_sin (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate sin for each element of input tensor. More...
 
int csinn_cos_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 col initialization function More...
 
int csinn_cos (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate cos for each element of input tensor. More...
 
int csinn_tanh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 tanh initialization function More...
 
int csinn_tanh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate tan for each element of input tensor. More...
 
int csinn_log_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Log initialization function. More...
 
int csinn_log (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate log for each element of input tensor. More...
 
int csinn_sqrt_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Sqrt initialization function. More...
 
int csinn_sqrt (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate sqrt for each element of input tensor. More...
 
int csinn_rsqrt_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Rsqrt initialization function. More...
 
int csinn_rsqrt (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate rsqrt for each element of input tensor. More...
 
int csinn_square_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Square initialization function. More...
 
int csinn_square (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate square for each element of input tensor. More...
 
int csinn_sigmoid_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_sigmoid_params *params)
 Sigmoid initialization function. More...
 
int csinn_sigmoid (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_sigmoid_params *params)
 Calculate sigmoid for each element of input tensor. More...
 
int csinn_hard_sigmoid_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_sigmoid_params *params)
 Hard sigmoid initialization function. More...
 
int csinn_hard_sigmoid (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_sigmoid_params *params)
 Calculate hard sigmoid for each element of input tensor. More...
 
int csinn_elu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 ELU initialization function. More...
 
int csinn_elu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ELU for each element of input tensor. More...
 
int csinn_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 ReLU initialization function. More...
 
int csinn_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ReLU for each element of input tensor. More...
 
int csinn_relu1_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 ReLU1 initialization function. More...
 
int csinn_relu1 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ReLU1 for each element of input tensor. More...
 
int csinn_relu6_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 ReLU6 initialization function. More...
 
int csinn_relu6 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ReLU6 for each element of input tensor. More...
 
int csinn_relun_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 ReLUn initialization function. More...
 
int csinn_relun (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ReLUn for each element of input tensor. More...
 
int csinn_leaky_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Leaky ReLU initialization function. More...
 
int csinn_leaky_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate Leaky ReLU for each element of input tensor. More...
 
int csinn_softrelu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Soft ReLU initialization function. More...
 
int csinn_softrelu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate Soft ReLU for each element of input tensor. More...
 
int csinn_prelu_init (struct csinn_tensor *input, struct csinn_tensor *alpha, struct csinn_tensor *output, struct csinn_prelu_params *params)
 PReLU initialization function. More...
 
int csinn_prelu (struct csinn_tensor *input, struct csinn_tensor *alpha, struct csinn_tensor *output, struct csinn_prelu_params *params)
 Calculate PReLU for each element of input tensor. More...
 
int csinn_softplus_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Softplus initialization function. More...
 
int csinn_softplus (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate Softplus for each element of input tensor. More...
 
int csinn_softmax_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_softmax_params *params)
 Softmax initialization function. More...
 
int csinn_softmax (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_softmax_params *params)
 Calculate Softmax for each element of input tensor. More...
 
int csinn_log_softmax_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_softmax_params *params)
 Log softmax initialization function. More...
 
int csinn_log_softmax (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_softmax_params *params)
 Calculate Log Softmax for each element of input tensor. More...
 
int csinn_batch_normalization_init (struct csinn_tensor *input, struct csinn_tensor *mean, struct csinn_tensor *variance, struct csinn_tensor *gamma, struct csinn_tensor *beta, struct csinn_tensor *output, struct csinn_bn_params *params)
 Batch normalization initialization function. More...
 
int csinn_batch_normalization (struct csinn_tensor *input, struct csinn_tensor *mean, struct csinn_tensor *variance, struct csinn_tensor *gamma, struct csinn_tensor *beta, struct csinn_tensor *output, struct csinn_bn_params *params)
 Batch normalization function. More...
 
int csinn_l2_normalization_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_l2n_params *params)
 L2 normalization initialization function. More...
 
int csinn_l2_normalization (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_l2n_params *params)
 Calculate L2 Normalization for each element of input tensor. More...
 
int csinn_lrn_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_lrn_params *params)
 Local Response Normalization initialization function. More...
 
int csinn_lrn (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_lrn_params *params)
 Calculate Local Response Normalization for each element of input tensor. More...
 
int csinn_matmul_init (struct csinn_tensor *mat0, struct csinn_tensor *mat1, struct csinn_tensor *output, struct csinn_matmul_params *params)
 Matmul initialization function. More...
 
int csinn_matmul (struct csinn_tensor *mat0, struct csinn_tensor *mat1, struct csinn_tensor *output, struct csinn_matmul_params *params)
 Calculate Matmul for each element of two input tensors. More...
 
int csinn_add_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Add initialization function. More...
 
int csinn_add (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Add each element of two input tensors. More...
 
int csinn_sub_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Sub initialization function. More...
 
int csinn_sub (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Subtract each element of two input tensors. More...
 
int csinn_mul_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Mul initialization function. More...
 
int csinn_mul (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Multiply each element of two input tensors. More...
 
int csinn_div_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Div initialization function. More...
 
int csinn_div (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Divide each element of two input tensors. More...
 
int csinn_floor_divide_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Floor div initialization function. More...
 
int csinn_floor_divide (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Floor divide each element of two input tensors. More...
 
int csinn_floor_mod_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Floor mod initialization function. More...
 
int csinn_floor_mod (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate Floor MOD for each element of two input tensors. More...
 
int csinn_mod_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Mod initialization function. More...
 
int csinn_mod (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate MOD for each element of two input tensors. More...
 
int csinn_maximum_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Maximum initialization function. More...
 
int csinn_maximum (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate MAX for each element of two input tensors. More...
 
int csinn_minimum_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Minimum initialization function. More...
 
int csinn_minimum (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate MIN for each element of two input tensors. More...
 
int csinn_power_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Power initialization function. More...
 
int csinn_power (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Power function. More...
 
int csinn_greater_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Greater initialization function. More...
 
int csinn_greater (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is greater than input1 for each element of two input tensors. More...
 
int csinn_less_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Less initialization function. More...
 
int csinn_less (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is less than input1 for each element of two input tensors. More...
 
int csinn_logical_and_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Logical AND initialization function. More...
 
int csinn_logical_and (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate Logical AND for each element of two input tensors. More...
 
int csinn_logical_or_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Logical OR initialization function. More...
 
int csinn_logical_or (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate Logical OR for each element of two input tensors. More...
 
int csinn_logical_not_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Logical NOT initialization function. More...
 
int csinn_logical_not (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate Logical NOT for each element of two input tensors. More...
 
int csinn_logical_xor_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Logical XOR initialization function. More...
 
int csinn_logical_xor (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate Logical XOR for each element of two input tensors. More...
 
int csinn_equal_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Equal initialization function. More...
 
int csinn_equal (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is equal to input1 for each element of two input tensors. More...
 
int csinn_not_equal_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Not equal initialization function. More...
 
int csinn_not_equal (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is not equal to input1 for each element of two input tensors. More...
 
int csinn_greater_equal_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Greater equal initialization function. More...
 
int csinn_greater_equal (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is greater than or equal to input1 for each element of two input tensors. More...
 
int csinn_less_equal_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Less equal initialization function. More...
 
int csinn_less_equal (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Compare whether input0 is less than or equal to input1 for each element of two input tensors. More...
 
int csinn_select_init (struct csinn_tensor *condition, struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_select_params *params)
 Select initialization function. More...
 
int csinn_select (struct csinn_tensor *condition, struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_select_params *params)
 Select each element from two input tensors according to the condition tensor. More...
 
int csinn_and_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 AND initialization function. More...
 
int csinn_and (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate AND for each element of two input tensors. More...
 
int csinn_or_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 OR initialization function. More...
 
int csinn_or (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate OR for each element of two input tensors. More...
 
int csinn_xor_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 XOR initialization function. More...
 
int csinn_xor (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_diso_params *params)
 Calculate XOR for each element of two input tensors. More...
 
int csinn_not_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 NOT initialization function. More...
 
int csinn_not (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate NOT for each element of two input tensors. More...
 
int csinn_pad_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pad_params *params)
 Pad initialization function. More...
 
int csinn_pad (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pad_params *params)
 Padding input tensor. More...
 
int csinn_resize_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_resize_params *params)
 Resize initialization function. More...
 
int csinn_resize (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_resize_params *params)
 Resize input tensor. More...
 
int csinn_concat_init (struct csinn_tensor **input, struct csinn_tensor *output, struct csinn_concat_params *params)
 Concat initialization function. More...
 
int csinn_concat (struct csinn_tensor **input, struct csinn_tensor *output, struct csinn_concat_params *params)
 Concat multiple input tensors according to the specified dimension. More...
 
int csinn_proposal_init (struct csinn_tensor *cls_prob, struct csinn_tensor *bbox_pred, struct csinn_tensor *im_info, struct csinn_tensor *output, struct csinn_proposal_params *params)
 Proposal initialization function. More...
 
int csinn_proposal (struct csinn_tensor *cls_prob, struct csinn_tensor *bbox_pred, struct csinn_tensor *im_info, struct csinn_tensor *output, struct csinn_proposal_params *params)
 Proposal initialization function. More...
 
int csinn_psroipooling_init (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_psroipooling_params *params)
 PS ROI pooling initialization function. More...
 
int csinn_psroipooling (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_psroipooling_params *params)
 PS ROI pooling function. More...
 
int csinn_transpose_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_transpose_params *params)
 Transpose initialization function. More...
 
int csinn_transpose (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_transpose_params *params)
 Transpose function. More...
 
int csinn_reshape_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reshape_params *params)
 Reshape initialization function. More...
 
int csinn_reshape (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reshape_params *params)
 Reset the dimensions of input tensor. Reshape is essentially a memcpy. More...
 
int csinn_shape_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_shape_params *params)
 Shape initialization function. More...
 
int csinn_shape (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_shape_params *params)
 Get the dimension information of input tensor. More...
 
int csinn_expand_dims_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_expand_dims_params *params)
 Expand dims initialization function. More...
 
int csinn_expand_dims (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_expand_dims_params *params)
 Expand the dimension of input tensor. More...
 
int csinn_reverse_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reverse_params *params)
 Reverse initialization function. More...
 
int csinn_reverse (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reverse_params *params)
 Flip the specified dimension of input tensor. More...
 
int csinn_flatten_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_flatten_params *params)
 Flatten initialization function. More...
 
int csinn_flatten (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_flatten_params *params)
 Flatten input tensor. More...
 
int csinn_crop_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_crop_params *params)
 Crop initialization function. More...
 
int csinn_crop (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_crop_params *params)
 Crop input tensor. More...
 
int csinn_slice_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_slice_params *params)
 Slice initialization function. More...
 
int csinn_slice (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_slice_params *params)
 Slice input tensor. More...
 
int csinn_split_init (struct csinn_tensor *input, struct csinn_tensor **output, struct csinn_split_params *params)
 Split initialization function. More...
 
int csinn_split (struct csinn_tensor *input, struct csinn_tensor **output, struct csinn_split_params *params)
 Split input tensor into multiple tensors according to the specified dimensions. More...
 
int csinn_stack_init (struct csinn_tensor **inputs, struct csinn_tensor *output, struct csinn_stack_params *params)
 Stack initialization function. More...
 
int csinn_stack (struct csinn_tensor **inputs, struct csinn_tensor *output, struct csinn_stack_params *params)
 Stack/splice several input tensors. More...
 
int csinn_unstack_init (struct csinn_tensor *input, struct csinn_tensor **output, struct csinn_unstack_params *params)
 Unstack initialization function. More...
 
int csinn_unstack (struct csinn_tensor *input, struct csinn_tensor **output, struct csinn_unstack_params *params)
 Unstack input tensor. More...
 
int csinn_tile_init (struct csinn_tensor *inputs, struct csinn_tensor *output, struct csinn_tile_params *params)
 Tile initialization function. More...
 
int csinn_tile (struct csinn_tensor *inputs, struct csinn_tensor *output, struct csinn_tile_params *params)
 Repeat input tensor. More...
 
int csinn_arange_init (struct csinn_tensor *output, struct csinn_arange_params *params)
 Arange initialization function. More...
 
int csinn_arange (struct csinn_tensor *output, struct csinn_arange_params *params)
 Return the position information within the range according to the parameters. More...
 
int csinn_where_init (struct csinn_tensor *condition, struct csinn_tensor *x, struct csinn_tensor *y, struct csinn_tensor *output, struct csinn_where_params *params)
 Where initialization function. More...
 
int csinn_where (struct csinn_tensor *condition, struct csinn_tensor *x, struct csinn_tensor *y, struct csinn_tensor *output, struct csinn_where_params *params)
 Select each element from two input tensors according to the condition tensor. More...
 
int csinn_where_softmax_init (struct csinn_tensor *condition, struct csinn_tensor *y, struct csinn_tensor *output, struct csinn_where_softmax_params *params)
 Where initialization function. More...
 
int csinn_where_softmax (struct csinn_tensor *condition, struct csinn_tensor *y, struct csinn_tensor *output, struct csinn_where_softmax_params *params)
 Select each element from two input tensors according to the condition tensor. More...
 
int csinn_gather_init (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *output, struct csinn_gather_params *params)
 Gather initialization function. More...
 
int csinn_gather (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *output, struct csinn_gather_params *params)
 Gather the data in input tensor according to the specified index. More...
 
int csinn_gather_nd_init (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *output, struct csinn_gather_nd_params *params)
 Gather_nd initialization function. More...
 
int csinn_gather_nd (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *output, struct csinn_gather_nd_params *params)
 Gather the data in input tensor according to the specified index. More...
 
int csinn_squeeze_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_squeeze_params *params)
 Squeeze initialization function. More...
 
int csinn_squeeze (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_squeeze_params *params)
 Tile the data in input tensor. More...
 
int csinn_ndarray_size_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_ndarray_size_params *params)
 Ndarray size initialization function. More...
 
int csinn_ndarray_size (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_ndarray_size_params *params)
 Calculate the size of input tensor data. More...
 
int csinn_space_to_batch_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_batch_params *params)
 Space to batch initialization function. More...
 
int csinn_space_to_batch (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_batch_params *params)
 Fill the batch according to the height and width of input tensor. More...
 
int csinn_space_to_batch_nd_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_batch_nd_params *params)
 Space to batch nd initialization function. More...
 
int csinn_space_to_batch_nd (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_batch_nd_params *params)
 Fill the batch according to the spatial dimensions such as height and width of input tensor. More...
 
int csinn_batch_to_space_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_batch_to_space_params *params)
 Batch to space initialization function. More...
 
int csinn_batch_to_space (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_batch_to_space_params *params)
 Fill the batch into the height and width of input tensor. More...
 
int csinn_batch_to_space_nd_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_batch_to_space_nd_params *params)
 Batch to space nd initialization function. More...
 
int csinn_batch_to_space_nd (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_batch_to_space_nd_params *params)
 Fill the batch into the spatial dimensions such as height and width of input tensor. More...
 
int csinn_space_to_depth_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_depth_params *params)
 Space to depth initialization function. More...
 
int csinn_space_to_depth (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_space_to_depth_params *params)
 Fill the depth according to the height and width of input tensor. More...
 
int csinn_depth_to_space_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_depth_to_space_params *params)
 Depth to space initialization function. More...
 
int csinn_depth_to_space (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_depth_to_space_params *params)
 Fill the depth into the height and width of input tensor. More...
 
int csinn_one_hot_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_one_hot_params *params)
 One Hot initialization function. More...
 
int csinn_one_hot (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_one_hot_params *params)
 Return One-Hot eigenvector. More...
 
int csinn_sequence_mask_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_sequence_mask_params *params)
 Sequence mask initialization function. More...
 
int csinn_sequence_mask (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_sequence_mask_params *params)
 Get the mask of sequence. More...
 
int csinn_im2col_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_im2col_params *params)
 im2col initialization function More...
 
int csinn_im2col (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_im2col_params *params)
 Convert image to columns. More...
 
int csinn_col2im_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_col2im_params *params)
 col2im initialization function More...
 
int csinn_col2im (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_col2im_params *params)
 Convert columns to image. More...
 
int csinn_sum_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Sum initialization function. More...
 
int csinn_sum (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the sum of input tensor on the specified dimensions. More...
 
int csinn_mean_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Mean initialization function. More...
 
int csinn_mean (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the mean value of input tensor on the specified dimensions. More...
 
int csinn_max_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Max initialization function. More...
 
int csinn_max (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the maximum value of input tensor on the specified dimensions. More...
 
int csinn_min_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Min initialization function. More...
 
int csinn_min (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the min value of input tensor on the specified dimensions. More...
 
int csinn_prod_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Prod initialization function. More...
 
int csinn_prod (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the product value of input tensor on the specified dimensions. More...
 
int csinn_argmin_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Argmin initialization function. More...
 
int csinn_argmin (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the index of the minimum value of input tensor on the specified dimensions. More...
 
int csinn_argmax_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Argmax initialization function. More...
 
int csinn_argmax (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the index of the maximum value of input tensor on the specified dimensions. More...
 
int csinn_all_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 All initialization function. More...
 
int csinn_all (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate Reduce AND of input tensor on the specified dimensions. More...
 
int csinn_any_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Any initialization function. More...
 
int csinn_any (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate Reduce OR of input tensor on the specified dimensions. More...
 
int csinn_reorg_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reorg_params *params)
 Reorg initialization function. More...
 
int csinn_reorg (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reorg_params *params)
 Cut the height and width, then splice them along the channel. More...
 
int csinn_yuv_rgb_scale_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 YUV RGB scale initialization function. More...
 
int csinn_yuv_rgb_scale (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Convert YUV to RGB. More...
 
int csinn_segment_max_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Segment max initialization function. More...
 
int csinn_segment_max (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Compare the maximum value of input tensor at the specified positions. More...
 
int csinn_segment_min_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Segment min initialization function. More...
 
int csinn_segment_min (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Compare the minimum value of input tensor at the specified positions. More...
 
int csinn_segment_sum_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Segment sum initialization function. More...
 
int csinn_segment_sum (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Calculate the sum of input tensor at the specified positions. More...
 
int csinn_segment_mean_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Segment mean initialization function. More...
 
int csinn_segment_mean (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Calculate the mean value of input tensor at the specified positions. More...
 
int csinn_segment_prod_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Segment prod initialization function. More...
 
int csinn_segment_prod (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_segment_params *params)
 Calculate the product value of input tensor at the specified positions. More...
 
int csinn_threshold_relu_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Threshold ReLU initialization function. More...
 
int csinn_threshold_relu (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate Threshold ReLU for each element of input tensor. More...
 
int csinn_acos_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 acos initialization function More...
 
int csinn_acos (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate acos for each element of input tensor. More...
 
int csinn_acosh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 acosh initialization function More...
 
int csinn_acosh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate acosh for each element of input tensor. More...
 
int csinn_asin_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 asin initialization function More...
 
int csinn_asin (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate asin for each element of input tensor. More...
 
int csinn_asinh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 asinh initialization function More...
 
int csinn_asinh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate asinh for each element of input tensor. More...
 
int csinn_atan_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 atan initialization function More...
 
int csinn_atan (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate atan for each element of input tensor. More...
 
int csinn_atanh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 atanh initialization function More...
 
int csinn_atanh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate atanh for each element of input tensor. More...
 
int csinn_cosh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 colh function More...
 
int csinn_cosh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate cosh for each element of input tensor. More...
 
int csinn_sinh_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 sinh initialization function More...
 
int csinn_sinh (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate sinh for each element of input tensor. More...
 
int csinn_tan_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 tan initialization function More...
 
int csinn_tan (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate tan for each element of input tensor. More...
 
int csinn_log1p_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Log1p initialization function. More...
 
int csinn_log1p (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate log1p for each element of input tensor. More...
 
int csinn_softsign_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Softsign initialization function. More...
 
int csinn_softsign (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate softsign for each element of input tensor. More...
 
int csinn_erf_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Erf initialization function. More...
 
int csinn_erf (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate erf for each element of input tensor. More...
 
int csinn_cumsum_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cumsum_params *params)
 Cumsum initialization function. More...
 
int csinn_cumsum (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cumsum_params *params)
 Calculate the cumulative sum of input tensor on the specified dimensions. More...
 
int csinn_cumprod_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cumprod_params *params)
 Cumprod initialization function. More...
 
int csinn_cumprod (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cumprod_params *params)
 Calculate the cumulative product value of input tensor on the specified dimensions. More...
 
int csinn_reduce_max_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce max initialization function. More...
 
int csinn_reduce_max (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced maximum value of input tensor on the specified dimensions. More...
 
int csinn_reduce_min_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce min initialization function. More...
 
int csinn_reduce_min (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced minimum value of input tensor on the specified dimensions. More...
 
int csinn_reduce_mean_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce mean initialization function. More...
 
int csinn_reduce_mean (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced mean value of input tensor on the specified dimensions. More...
 
int csinn_reduce_sum_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce sum initialization function. More...
 
int csinn_reduce_sum (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced sum of input tensor on the specified dimensions. More...
 
int csinn_reduce_prod_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce prod initialization function. More...
 
int csinn_reduce_prod (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced product value of input tensor on the specified dimensions. More...
 
int csinn_reduce_logsumexp_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Reduce LogSumExp initialization function. More...
 
int csinn_reduce_logsumexp (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_reduce_params *params)
 Calculate the reduced LogSumExp value of input tensor on the specified dimensions. More...
 
int csinn_broadcast_to_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_broadcast_to_params *params)
 Broadcast to initialization function. More...
 
int csinn_broadcast_to (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_broadcast_to_params *params)
 Broadcast the input tensor. More...
 
int csinn_scatter_nd_init (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *updates, struct csinn_tensor *output, struct csinn_scatter_nd_params *params)
 Scatter nd initialization function. More...
 
int csinn_scatter_nd (struct csinn_tensor *input, struct csinn_tensor *indices, struct csinn_tensor *updates, struct csinn_tensor *output, struct csinn_scatter_nd_params *params)
 Scatter nd function. More...
 
int csinn_clip_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_clip_params *params)
 Clip initialization function. More...
 
int csinn_clip (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_clip_params *params)
 Saturate the input tensor. More...
 
int csinn_strided_slice_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_strided_slice_params *params)
 Stride slice initialization function. More...
 
int csinn_strided_slice (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_strided_slice_params *params)
 Slice the input tensor by stride. More...
 
int csinn_topk_init (struct csinn_tensor *input, struct csinn_tensor *output1, struct csinn_tensor *output2, struct csinn_topk_params *params)
 TOP-k initialization function. More...
 
int csinn_topk (struct csinn_tensor *input, struct csinn_tensor *output1, struct csinn_tensor *output2, struct csinn_topk_params *params)
 Find the maximum k elements and their indices of input tensor. More...
 
int csinn_non_max_suppression_init (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_non_max_suppression_params *params)
 Non-max suppression initialization function. More...
 
int csinn_non_max_suppression (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_non_max_suppression_params *params)
 Non-max suppression function. More...
 
int csinn_shuffle_channel_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_shuffle_channel_params *params)
 Shuffle channel initialization function. More...
 
int csinn_shuffle_channel (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_shuffle_channel_params *params)
 Group input tensor and shuffle them by group. More...
 
int csinn_roipool_init (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_roi_pool_params *params)
 ROI pooling initialization function. More...
 
int csinn_roipool (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_roi_pool_params *params)
 ROI pooling function. More...
 
int csinn_layer_norm_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *gamma, struct csinn_tensor *beta, struct csinn_layer_norm_params *params)
 Layer normalization initialization function. More...
 
int csinn_layer_norm (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *gamma, struct csinn_tensor *beta, struct csinn_layer_norm_params *params)
 Layer normalization function. More...
 
int csinn_cache_matmul_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weight, struct csinn_tensor *bias, struct csinn_cache_matmul_params *params)
 Cache matmul initialization function. More...
 
int csinn_cache_matmul (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weight, struct csinn_tensor *bias, struct csinn_cache_matmul_params *params)
 Cache matmul function. More...
 
int csinn_cache_conv1d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weight, struct csinn_tensor *bias, struct csinn_cache_conv1d_params *params)
 Cache conv1d initialization function. More...
 
int csinn_cache_conv1d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *weight, struct csinn_tensor *bias, struct csinn_cache_conv1d_params *params)
 Cache conv1d function. More...
 
int csinn_conv1d_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv1d_params *params)
 One-dimensional convolution initialization function. More...
 
int csinn_conv1d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tensor *kernel, struct csinn_tensor *bias, struct csinn_conv1d_params *params)
 One-dimensional convolution function. More...
 
int csinn_cast_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cast_params *params)
 Data convert initialization function. More...
 
int csinn_cast (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cast_params *params)
 Data convert function. More...
 
int csinn_data_convert_init (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Data convert initialization function. More...
 
int csinn_data_convert (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Data convert function. More...
 

Function Documentation

◆ csinn_fullyconnected_relu_init()

int csinn_fullyconnected_relu_init ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_tensor weights,
struct csinn_tensor bias,
struct csinn_fc_params params 
)

Fully Connected and ReLU fusion initialization function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]weightsPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsFully Connected parameter descriptor
Returns
On success, the return value is 1. If an error occurred while executing the function, the return value is less than or equal to 0.

◆ csinn_fullyconnected_relu()

int csinn_fullyconnected_relu ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_tensor weights,
struct csinn_tensor bias,
struct csinn_fc_params params 
)

Fully Connected and ReLU fusion function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]weightsPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsFully Connected parameter descriptor
Returns
On success, the return value is 1. If an error occurred while executing the function, the return value is less than or equal to 0.

◆ csinn_pool_with_argmax_init()

int csinn_pool_with_argmax_init ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_pool_params params 
)

Pooling and argmax fusion initialization function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsPooling parameter descriptor
Returns
On success, the return value is 1. If an error occurred while executing the function, the return value is less than or equal to 0.

◆ csinn_pool_with_argmax()

int csinn_pool_with_argmax ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_pool_params params 
)

Pooling and argmax fusion function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsPooling parameter descriptor
Returns
On success, the return value is 1. If an error occurred while executing the function, the return value is less than or equal to 0.