SHL 2.2.x
Loading...
Searching...
No Matches
NN function

Functions

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_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 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate acosh for each element of input tensor. 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_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_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_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_arange (struct csinn_tensor *output, struct csinn_arange_params *params)
 Return the position information within the range according to the parameters. 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_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_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 (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 (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 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Calculate atanh for each element of input tensor. 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 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional average pooling 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_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 (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_broadcast_to (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_broadcast_to_params *params)
 Broadcast the input tensor. 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_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_cast (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_cast_params *params)
 Data convert 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_clip (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_clip_params *params)
 Saturate the input tensor. 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_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_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_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_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_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_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_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_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_crop (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_crop_params *params)
 Crop input tensor. 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_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_data_convert (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Data convert 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_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_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_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_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_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_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_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_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_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_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_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_flatten (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_flatten_params *params)
 Flatten input tensor. 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_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 (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_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 (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_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 (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_global_avgpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional global average pooling 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_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_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_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_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_im2col (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_im2col_params *params)
 Convert image to columns. 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_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_l2pool (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 L2 pooling 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_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_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_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_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_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_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_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_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_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_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_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 (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_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_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_maxpool2d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Two-dimensional max pooling 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_maxpool3d (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pool_params *params)
 Three-dimensional max pooling 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_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_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_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_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_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_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_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_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_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_one_hot (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_one_hot_params *params)
 Return One-Hot eigenvector. 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_pad (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_pad_params *params)
 Padding input tensor. 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_prelu (struct csinn_tensor *input0, struct csinn_tensor *input1, struct csinn_tensor *output, struct csinn_prelu_params *params)
 Calculate PReLU for each element of input tensor. 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_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 (struct csinn_tensor *data, struct csinn_tensor *rois, struct csinn_tensor *output, struct csinn_psroipooling_params *params)
 PS ROI pooling 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_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_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_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_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_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_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 (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 (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 (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_relu_params *params)
 Calculate ReLUn for each element of input tensor. 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_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_resize (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_resize_params *params)
 Resize input tensor. 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_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_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_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_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_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_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_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_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_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_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_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_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_shape (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_shape_params *params)
 Get the dimension information of input tensor. 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_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_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_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_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_slice (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_slice_params *params)
 Slice input tensor. 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_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_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_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_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 (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_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_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_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_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_squeeze (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_squeeze_params *params)
 Tile the data in input tensor. More...
 
int csinn_stack (struct csinn_tensor **input, struct csinn_tensor *output, struct csinn_stack_params *params)
 Stack/splice several input tensors. 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_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_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_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_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_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_tile (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_tile_params *params)
 Repeat input tensor. 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_transpose (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_transpose_params *params)
 Transpose 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_unpooling (struct csinn_tensor *input, struct csinn_tensor *mask, struct csinn_tensor *output, struct csinn_unpooling_params *params)
 Unpooling function. More...
 
int csinn_unstack (struct csinn_tensor *input, struct csinn_tensor **output, struct csinn_unstack_params *params)
 Unstack input tensor. 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 (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_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_yuv_rgb_scale (struct csinn_tensor *input, struct csinn_tensor *output, struct csinn_siso_params *params)
 Convert YUV to RGB. More...
 

Detailed Description

Function Documentation

◆ csinn_abs()

int csinn_abs ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate abs for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsAbs 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_acos()

int csinn_acos ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate acos for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsacos 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_acosh()

int csinn_acosh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate acosh for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsacosh 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_add()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsAdd 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_all()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsAll 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_and()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsAND 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_any()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsAny 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_arange()

int csinn_arange ( struct csinn_tensor output,
struct csinn_arange_params params 
)

Return the position information within the range according to the parameters.

Parameters
[out]outputPointer to the output tensor
[in]paramsArange 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_argmax()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsArgmax 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_argmin()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsArgmin 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_asin()

int csinn_asin ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate asin for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsasin 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_asinh()

int csinn_asinh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate asinh for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsasinh 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_atan()

int csinn_atan ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate atan for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsatan 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_atanh()

int csinn_atanh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate atanh for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsatanh 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_avgpool2d()

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

Two-dimensional average pooling 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_avgpool3d()

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

Three-dimensional average pooling 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_batch_normalization()

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.

Parameters
[in]inputPointer to the input tensor
[in]meanMean value used to calculate BN
[in]varianceVariance used to caculate BN
[in]gammaγ coefficient used to caculate BN
[in]betaβ coefficient used to caculate BN
[out]outputPointer to the output tensor
[in]paramsBatch normalization 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.

Usually, after deploying tools to process the model, the BN layer can be merged with the previous convolution layer

◆ csinn_batch_to_space()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsBatch to space 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_batch_to_space_nd()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsBatch to space nd 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_broadcast_to()

int csinn_broadcast_to ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_broadcast_to_params params 
)

Broadcast the input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsBroadcast to 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_cache_conv1d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]weightPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsCache conv1d 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_cache_matmul()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]weightPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsCache matmul 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_cast()

int csinn_cast ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_cast_params params 
)

Data convert function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsData convert 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_ceil()

int csinn_ceil ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate ceil for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsCeil 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_clip()

int csinn_clip ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_clip_params params 
)

Saturate the input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsClip 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_col2im()

int csinn_col2im ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_tensor kernel,
struct csinn_col2im_params params 
)

Convert columns to image.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]paramscol2im 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_concat()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsConcat 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_conv2d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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.
  • Support floating point and 8-bit fixed point.
  • Support NCHW and NHWC layouts.

◆ csinn_conv1d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_conv3d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_conv2d_relu()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_conv2d_relu6()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_cos()

int csinn_cos ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate cos for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramscol 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_cosh()

int csinn_cosh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate cosh for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramscolh 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_crop()

int csinn_crop ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_crop_params params 
)

Crop input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsCrop 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_cumprod()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsCumprod 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_cumsum()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsCumsum 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_data_convert()

int csinn_data_convert ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Data convert function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsData convert 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_deconv2d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_deconv3d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_depth_to_space()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsDepth to space 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_depthwise_conv2d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_depthwise_conv2d_relu()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_div()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsDiv 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_elu()

int csinn_elu ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_relu_params params 
)

Calculate ELU for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsELU 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_equal()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsEqual 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_erf()

int csinn_erf ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate erf for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsErf 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_exp()

int csinn_exp ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate exp for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsExp 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_expand_dims()

int csinn_expand_dims ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_expand_dims_params params 
)

Expand the dimension of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsExpand dims 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_expm1()

int csinn_expm1 ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate expm1 for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsExpm1 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_flatten()

int csinn_flatten ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_flatten_params params 
)

Flatten input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsFlatten 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_floor()

int csinn_floor ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate floor for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsFloor 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_floor_divide()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsFloor div 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_floor_mod()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsFloor mod 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_fsmn()

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.

Parameters
[in]framePoint to the current input frame data
[in]l_filterLeft coefficient matrix, used for matrix calculation with past frames
[in]r_filterRight coefficient matrix for matrix calculation with future frames
[in]frame_sequencePoint to all currently calculated frame data
[in]frame_counterFrame counter
[out]outputPointer to the output tensor
[in]paramsFSMN 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.

FSMN is essentially a feedforward full connection network (FNN). Its innovation lies in the addition of a memory block in its hidden layer. The function of the memory module is to encode the front and rear units of each hidden state together, so as to capture the front and rear relations of the sequence.

◆ csinn_fullyconnected()

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.

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_gather()

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.

Parameters
[in]inputPointer to the input tensor
[in]indicesPointer to the index tensor
[out]outputPointer to the output tensor
[in]paramsGather 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_gather_nd()

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.

Parameters
[in]inputPointer to the input tensor
[in]indicesPointer to the index tensor
[out]outputPointer to the output tensor
[in]paramsGather_nd 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_global_avgpool2d()

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

Two-dimensional global average pooling 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_global_avgpool2d is a special case for csinn_avgpool2d.

◆ csinn_global_maxpool2d()

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

Two-dimensional global max pooling 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_global_maxpool2d is a special case for csinn_maxpool2d.

◆ csinn_greater()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsGreater 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_greater_equal()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsGreater equal 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_group_conv2d()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]kernelPointer to the weight tensor
[in]biasPointer to the bias tensor
[in]paramsConvolution 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_hard_sigmoid()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsHard sigmoid 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_im2col()

int csinn_im2col ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_im2col_params params 
)

Convert image to columns.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsim2col 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_isnan_bool()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsIsnan bool 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_l2_normalization()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsL2 normalization 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_l2pool()

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

L2 pooling 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_layer_norm()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]gammaγ coefficient used to caculate LN
[in]betaβ coefficient used to caculate LN
[in]paramsLayer normalization 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_leaky_relu()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLeaky ReLU 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_less()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsLess 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_less_equal()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsLess equal 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_log()

int csinn_log ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate log for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLog 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_log1p()

int csinn_log1p ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate log1p for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLog1p 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_log_softmax()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLog softmax 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_logical_and()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsLogical AND 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_logical_not()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLogical NOT 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_logical_or()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsLogical OR 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_logical_xor()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsLogical XOR 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_lrn()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsLRN 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_matmul()

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.

Parameters
[in]mat0Pointer to the input0 tensor
[in]mat1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsMatmul 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_max()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsMax 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_maximum()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsMaximum 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_maxpool2d()

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

Two-dimensional max pooling 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_maxpool2d_locat()

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

Max pooling and with locating information 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_maxpool3d()

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

Three-dimensional max pooling 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_mean()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsMean 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_min()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsMin 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_minimum()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsMinimum 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_mod()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsMod 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_mul()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsMul 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_ndarray_size()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsNdarray size 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_negative()

int csinn_negative ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate negtive for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsNegative 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_non_max_suppression()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsNon-max suppression 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.

Non-max suppression is generally used for post-processing of detection models to filter out redundant candidate frames.

◆ csinn_not()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsNOT 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_not_equal()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsNot equal 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_one_hot()

int csinn_one_hot ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_one_hot_params params 
)

Return One-Hot eigenvector.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsOne Hot 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_or()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsOR 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_pad()

int csinn_pad ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_pad_params params 
)

Padding input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsPad 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_power()

int csinn_power ( struct csinn_tensor input0,
struct csinn_tensor input1,
struct csinn_tensor output,
struct csinn_diso_params params 
)

Power function.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsPower 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.

The first tensor is the base of POW, and the second tensor is the exponential of POW.

◆ csinn_prelu()

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.

Parameters
[in]inputPointer to the input tensor
[in]alphaPointer to the α coefficient tensor
[out]outputPointer to the output tensor
[in]paramsPReLU 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_prod()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsProd 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_proposal()

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.

Parameters
[in]cls_probPointer to the classification input tensor
[in]bbox_predPointer to the box input tensor
[in]im_infoPointer to the image input tensor
[out]outputPointer to the output tensor
[in]paramsProposal 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.

Special layer from the Faster RCNN.

◆ csinn_psroipooling()

int csinn_psroipooling ( struct csinn_tensor data,
struct csinn_tensor rois,
struct csinn_tensor output,
struct csinn_psroipooling_params params 
)

PS ROI pooling function.

Parameters
[in]dataPointer to the input tensor
[in]roisROI information
[out]outputPointer to the output tensor
[in]paramsPS ROI pooling 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_reduce_logsumexp()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce LogSumExp 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_reduce_max()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce max 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_reduce_mean()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce mean 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_reduce_min()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce min 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_reduce_prod()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce prod 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_reduce_sum()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReduce sum 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_relu()

int csinn_relu ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_relu_params params 
)

Calculate ReLU for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReLU 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_relu1()

int csinn_relu1 ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_relu_params params 
)

Calculate ReLU1 for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReLU1 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_relu6()

int csinn_relu6 ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_relu_params params 
)

Calculate ReLU6 for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReLU6 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_relun()

int csinn_relun ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_relu_params params 
)

Calculate ReLUn for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReLUn 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_reorg()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReorg 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_reshape()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReshape 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_resize()

int csinn_resize ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_resize_params params 
)

Resize input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsResize 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_reverse()

int csinn_reverse ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_reverse_params params 
)

Flip the specified dimension of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsReverse 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_roi_align()

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.

Parameters
[in]dataPointer to the input tensor
[in]roisROI information
[out]outputPointer to the output tensor
[in]paramsROI align 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_roipool()

int csinn_roipool ( struct csinn_tensor data,
struct csinn_tensor rois,
struct csinn_tensor output,
struct csinn_roi_pool_params params 
)

ROI pooling function.

Parameters
[in]dataPointer to the input tensor
[in]roisROI information
[out]outputPointer to the output tensor
[in]paramsROI pooling 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_round()

int csinn_round ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate round for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsRound 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_rsqrt()

int csinn_rsqrt ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate rsqrt for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsRsqrt 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_scatter_nd()

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.

Parameters
[in]inputPointer to the input tensor
[in]indicesPointer to the index tensor
[in]updatesPointer to the distribution of update tensor
[out]outputPointer to the output tensor
[in]paramsBroadcast to 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.

The index applies sparse updates to a single value or slice in the zero tensor of a given shape to create a new tensor, the inverse operation of gather_nd.

◆ csinn_segment_max()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSegment max 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_segment_mean()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSegment mean 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_segment_min()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSegment min 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_segment_prod()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSegment prod 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_segment_sum()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSegment sum 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_select()

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.

Parameters
[in]conditionPointer to the condition tensor
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSelect 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_sequence_mask()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSequence mask 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.

The output is usually of bool type, which can be used to fill in sentences and words.

◆ csinn_shape()

int csinn_shape ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_shape_params params 
)

Get the dimension information of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsShape 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_shuffle_channel()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsShuffle channel 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.

Combined with grouping convolution, it alleviates the problem of channel locality among different groups and increases the generalization ability of the model, which is proposed in shuffelNet.

◆ csinn_sigmoid()

int csinn_sigmoid ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_sigmoid_params params 
)

Calculate sigmoid for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSigmoid 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_sign()

int csinn_sign ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate sign for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSign 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_sin()

int csinn_sin ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate sin for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramssin 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_sinh()

int csinn_sinh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate sinh for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramssinh 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_slice()

int csinn_slice ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_slice_params params 
)

Slice input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSlice 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_softmax()

int csinn_softmax ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_softmax_params params 
)

Calculate Softmax for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSoftmax 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_softplus()

int csinn_softplus ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate Softplus for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSoftplus 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_softrelu()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSoft ReLU 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_softsign()

int csinn_softsign ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate softsign for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSoftsign 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_space_to_batch()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSpace to batch 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_space_to_batch_nd()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSpace to batch nd 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_space_to_depth()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSpace to depth 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_split()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSplit 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_sqrt()

int csinn_sqrt ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate sqrt for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSqrt 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_square()

int csinn_square ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate square for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSquare 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_squeeze()

int csinn_squeeze ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_squeeze_params params 
)

Tile the data in input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSqueeze 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_stack()

int csinn_stack ( struct csinn_tensor **  inputs,
struct csinn_tensor output,
struct csinn_stack_params params 
)

Stack/splice several input tensors.

Parameters
[in]inputsPointer to the input tensors
[out]outputPointer to the output tensor
[in]paramsStack 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.

Note that different from concat, the dimensions of concat output tensor and input tensor remain unchanged, and the output tensor of stack is more dimensional than input tensor.

◆ csinn_strided_slice()

int csinn_strided_slice ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_strided_slice_params params 
)

Slice the input tensor by stride.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsStride slice 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_sub()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsSub 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_sum()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsSum 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_tan()

int csinn_tan ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate tan for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramstan 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_tanh()

int csinn_tanh ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate tan for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramstanh 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_threshold_relu()

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.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsThreshold ReLU 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_tile()

int csinn_tile ( struct csinn_tensor inputs,
struct csinn_tensor output,
struct csinn_tile_params params 
)

Repeat input tensor.

Parameters
[in]inputsPointer to the input tensors
[out]outputPointer to the output tensor
[in]paramsTile 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_topk()

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.

Parameters
[in]inputPointer to the input tensor
[out]output1Pointer to the output1 tensor
[out]output2Pointer to the output2 tensor
[in]paramsTOP-k 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_transpose()

int csinn_transpose ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_transpose_params params 
)

Transpose function.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsTranspose 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.

Transpose the dimension order of input tensor. Transpose is basically the same as permute. Permute is not implemented for the time being. Instead, transpose is used.

◆ csinn_trunc()

int csinn_trunc ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Calculate trunc for each element of input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsTrunc 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_unpooling()

int csinn_unpooling ( struct csinn_tensor input,
struct csinn_tensor mask,
struct csinn_tensor output,
struct csinn_unpooling_params params 
)

Unpooling function.

Parameters
[in]inputPointer to the input tensor
[in]maskLocating information
[out]outputPointer to the output tensor
[in]paramsUnpooling 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_unstack()

int csinn_unstack ( struct csinn_tensor input,
struct csinn_tensor **  output,
struct csinn_unstack_params params 
)

Unstack input tensor.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsUnstack 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.

Note that different from split, the dimension of split output tensor and input tensor remains unchanged, and the stack output tensor is one dimension less than input tensor.

◆ csinn_where()

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.

Parameters
[in]conditionPointer to the condition tensor
[in]xPointer to the x tensor
[in]yPointer to the y tensor
[out]outputPointer to the output tensor
[in]paramsWhere 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_where_softmax()

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.

Parameters
[in]conditionPointer to the condition tensor
[in]yPointer to the y tensor
[out]outputPointer to the output tensor
[in]paramsWhere 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_xor()

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.

Parameters
[in]input0Pointer to the input0 tensor
[in]input1Pointer to the input1 tensor
[out]outputPointer to the output tensor
[in]paramsXOR 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_yuv_rgb_scale()

int csinn_yuv_rgb_scale ( struct csinn_tensor input,
struct csinn_tensor output,
struct csinn_siso_params params 
)

Convert YUV to RGB.

Parameters
[in]inputPointer to the input tensor
[out]outputPointer to the output tensor
[in]paramsYUV RGB scale 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.