SHL 2.2.x
|
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... | |
int csinn_abs | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate abs
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Abs parameter descriptor |
int csinn_acos | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate acos
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | acos parameter descriptor |
int csinn_acosh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate acosh
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | acosh parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Add parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | All parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | AND parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Any parameter descriptor |
int csinn_arange | ( | struct csinn_tensor * | output, |
struct csinn_arange_params * | params | ||
) |
Return the position information within the range according to the parameters.
[out] | output | Pointer to the output tensor |
[in] | params | Arange parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Argmax parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Argmin parameter descriptor |
int csinn_asin | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate asin
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | asin parameter descriptor |
int csinn_asinh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate asinh
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | asinh parameter descriptor |
int csinn_atan | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate atan
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | atan parameter descriptor |
int csinn_atanh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate atanh
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | atanh parameter descriptor |
int csinn_avgpool2d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Two-dimensional average pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
int csinn_avgpool3d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Three-dimensional average pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[in] | mean | Mean value used to calculate BN |
[in] | variance | Variance used to caculate BN |
[in] | gamma | γ coefficient used to caculate BN |
[in] | beta | β coefficient used to caculate BN |
[out] | output | Pointer to the output tensor |
[in] | params | Batch normalization parameter descriptor |
Usually, after deploying tools to process the model, the BN layer can be merged with the previous convolution layer
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Batch to space parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Batch to space nd parameter descriptor |
int csinn_broadcast_to | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_broadcast_to_params * | params | ||
) |
Broadcast the input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Broadcast to parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | weight | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Cache conv1d parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | weight | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Cache matmul parameter descriptor |
int csinn_cast | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_cast_params * | params | ||
) |
Data convert function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Data convert parameter descriptor |
int csinn_ceil | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate ceil
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Ceil parameter descriptor |
int csinn_clip | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_clip_params * | params | ||
) |
Saturate the input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Clip parameter descriptor |
int csinn_col2im | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_tensor * | kernel, | ||
struct csinn_col2im_params * | params | ||
) |
Convert columns to image.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | params | col2im parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Concat parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
int csinn_cos | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate cos
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | col parameter descriptor |
int csinn_cosh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate cosh
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | colh parameter descriptor |
int csinn_crop | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_crop_params * | params | ||
) |
Crop input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Crop parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Cumprod parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Cumsum parameter descriptor |
int csinn_data_convert | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Data convert function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Data convert parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Depth to space parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Div parameter descriptor |
int csinn_elu | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_relu_params * | params | ||
) |
Calculate ELU
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | ELU parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Equal parameter descriptor |
int csinn_erf | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate erf
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Erf parameter descriptor |
int csinn_exp | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate exp
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Exp parameter descriptor |
int csinn_expand_dims | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_expand_dims_params * | params | ||
) |
Expand the dimension of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Expand dims parameter descriptor |
int csinn_expm1 | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate expm1
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Expm1 parameter descriptor |
int csinn_flatten | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_flatten_params * | params | ||
) |
Flatten input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Flatten parameter descriptor |
int csinn_floor | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate floor
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Floor parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Floor div parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Floor mod parameter descriptor |
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.
[in] | frame | Point to the current input frame data |
[in] | l_filter | Left coefficient matrix, used for matrix calculation with past frames |
[in] | r_filter | Right coefficient matrix for matrix calculation with future frames |
[in] | frame_sequence | Point to all currently calculated frame data |
[in] | frame_counter | Frame counter |
[out] | output | Pointer to the output tensor |
[in] | params | FSMN parameter descriptor |
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.
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | weights | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Fully Connected parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[in] | indices | Pointer to the index tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Gather parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[in] | indices | Pointer to the index tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Gather_nd parameter descriptor |
int csinn_global_avgpool2d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Two-dimensional global average pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
csinn_global_avgpool2d
is a special case for csinn_avgpool2d
.
int csinn_global_maxpool2d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Two-dimensional global max pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
csinn_global_maxpool2d
is a special case for csinn_maxpool2d
.
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Greater parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Greater equal parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | kernel | Pointer to the weight tensor |
[in] | bias | Pointer to the bias tensor |
[in] | params | Convolution parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Hard sigmoid parameter descriptor |
int csinn_im2col | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_im2col_params * | params | ||
) |
Convert image to columns.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | im2col parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Isnan bool parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | L2 normalization parameter descriptor |
int csinn_l2pool | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
L2 pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | gamma | γ coefficient used to caculate LN |
[in] | beta | β coefficient used to caculate LN |
[in] | params | Layer normalization parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Leaky ReLU parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Less parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Less equal parameter descriptor |
int csinn_log | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate log
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Log parameter descriptor |
int csinn_log1p | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate log1p
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Log1p parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Log softmax parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Logical AND parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Logical NOT parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Logical OR parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Logical XOR parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | LRN parameter descriptor |
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.
[in] | mat0 | Pointer to the input0 tensor |
[in] | mat1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Matmul parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Max parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Maximum parameter descriptor |
int csinn_maxpool2d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Two-dimensional max pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
int csinn_maxpool2d_locat | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Max pooling and with locating information function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
int csinn_maxpool3d | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pool_params * | params | ||
) |
Three-dimensional max pooling function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pooling parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Mean parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Min parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Minimum parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Mod parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Mul parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Ndarray size parameter descriptor |
int csinn_negative | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate negtive
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Negative parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Non-max suppression parameter descriptor |
Non-max suppression is generally used for post-processing of detection models to filter out redundant candidate frames.
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | NOT parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Not equal parameter descriptor |
int csinn_one_hot | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_one_hot_params * | params | ||
) |
Return One-Hot eigenvector.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | One Hot parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | OR parameter descriptor |
int csinn_pad | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_pad_params * | params | ||
) |
Padding input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Pad parameter descriptor |
int csinn_power | ( | struct csinn_tensor * | input0, |
struct csinn_tensor * | input1, | ||
struct csinn_tensor * | output, | ||
struct csinn_diso_params * | params | ||
) |
Power function.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Power parameter descriptor |
The first tensor is the base of POW
, and the second tensor is the exponential of POW
.
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.
[in] | input | Pointer to the input tensor |
[in] | alpha | Pointer to the α coefficient tensor |
[out] | output | Pointer to the output tensor |
[in] | params | PReLU parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Prod parameter descriptor |
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.
[in] | cls_prob | Pointer to the classification input tensor |
[in] | bbox_pred | Pointer to the box input tensor |
[in] | im_info | Pointer to the image input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Proposal parameter descriptor |
Special layer from the Faster RCNN.
int csinn_psroipooling | ( | struct csinn_tensor * | data, |
struct csinn_tensor * | rois, | ||
struct csinn_tensor * | output, | ||
struct csinn_psroipooling_params * | params | ||
) |
PS ROI pooling function.
[in] | data | Pointer to the input tensor |
[in] | rois | ROI information |
[out] | output | Pointer to the output tensor |
[in] | params | PS ROI pooling parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce LogSumExp parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce max parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce mean parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce min parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce prod parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reduce sum parameter descriptor |
int csinn_relu | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_relu_params * | params | ||
) |
Calculate ReLU
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | ReLU parameter descriptor |
int csinn_relu1 | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_relu_params * | params | ||
) |
Calculate ReLU1
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | ReLU1 parameter descriptor |
int csinn_relu6 | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_relu_params * | params | ||
) |
Calculate ReLU6
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | ReLU6 parameter descriptor |
int csinn_relun | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_relu_params * | params | ||
) |
Calculate ReLUn
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | ReLUn parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reorg parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reshape parameter descriptor |
int csinn_resize | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_resize_params * | params | ||
) |
Resize input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Resize parameter descriptor |
int csinn_reverse | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_reverse_params * | params | ||
) |
Flip the specified dimension of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Reverse parameter descriptor |
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.
[in] | data | Pointer to the input tensor |
[in] | rois | ROI information |
[out] | output | Pointer to the output tensor |
[in] | params | ROI align parameter descriptor |
int csinn_roipool | ( | struct csinn_tensor * | data, |
struct csinn_tensor * | rois, | ||
struct csinn_tensor * | output, | ||
struct csinn_roi_pool_params * | params | ||
) |
ROI pooling function.
[in] | data | Pointer to the input tensor |
[in] | rois | ROI information |
[out] | output | Pointer to the output tensor |
[in] | params | ROI pooling parameter descriptor |
int csinn_round | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate round
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Round parameter descriptor |
int csinn_rsqrt | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate rsqrt
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Rsqrt parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[in] | indices | Pointer to the index tensor |
[in] | updates | Pointer to the distribution of update tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Broadcast to parameter descriptor |
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.
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Segment max parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Segment mean parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Segment min parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Segment prod parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Segment sum parameter descriptor |
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.
[in] | condition | Pointer to the condition tensor |
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Select parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sequence mask parameter descriptor |
The output is usually of bool type, which can be used to fill in sentences and words.
int csinn_shape | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_shape_params * | params | ||
) |
Get the dimension information of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Shape parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Shuffle channel parameter descriptor |
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.
int csinn_sigmoid | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_sigmoid_params * | params | ||
) |
Calculate sigmoid
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sigmoid parameter descriptor |
int csinn_sign | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate sign
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sign parameter descriptor |
int csinn_sin | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate sin
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | sin parameter descriptor |
int csinn_sinh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate sinh
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | sinh parameter descriptor |
int csinn_slice | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_slice_params * | params | ||
) |
Slice input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Slice parameter descriptor |
int csinn_softmax | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_softmax_params * | params | ||
) |
Calculate Softmax
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Softmax parameter descriptor |
int csinn_softplus | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate Softplus
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Softplus parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Soft ReLU parameter descriptor |
int csinn_softsign | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate softsign
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Softsign parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Space to batch parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Space to batch nd parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Space to depth parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Split parameter descriptor |
int csinn_sqrt | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate sqrt
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sqrt parameter descriptor |
int csinn_square | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate square
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Square parameter descriptor |
int csinn_squeeze | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_squeeze_params * | params | ||
) |
Tile the data in input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Squeeze parameter descriptor |
int csinn_stack | ( | struct csinn_tensor ** | inputs, |
struct csinn_tensor * | output, | ||
struct csinn_stack_params * | params | ||
) |
Stack/splice several input tensors.
[in] | inputs | Pointer to the input tensors |
[out] | output | Pointer to the output tensor |
[in] | params | Stack parameter descriptor |
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.
int csinn_strided_slice | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_strided_slice_params * | params | ||
) |
Slice the input tensor by stride.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Stride slice parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sub parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Sum parameter descriptor |
int csinn_tan | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate tan
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | tan parameter descriptor |
int csinn_tanh | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate tan
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | tanh parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Threshold ReLU parameter descriptor |
int csinn_tile | ( | struct csinn_tensor * | inputs, |
struct csinn_tensor * | output, | ||
struct csinn_tile_params * | params | ||
) |
Repeat input tensor.
[in] | inputs | Pointer to the input tensors |
[out] | output | Pointer to the output tensor |
[in] | params | Tile parameter descriptor |
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.
[in] | input | Pointer to the input tensor |
[out] | output1 | Pointer to the output1 tensor |
[out] | output2 | Pointer to the output2 tensor |
[in] | params | TOP-k parameter descriptor |
int csinn_transpose | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_transpose_params * | params | ||
) |
Transpose function.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Transpose parameter descriptor |
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.
int csinn_trunc | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Calculate trunc
for each element of input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Trunc parameter descriptor |
int csinn_unpooling | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | mask, | ||
struct csinn_tensor * | output, | ||
struct csinn_unpooling_params * | params | ||
) |
Unpooling function.
[in] | input | Pointer to the input tensor |
[in] | mask | Locating information |
[out] | output | Pointer to the output tensor |
[in] | params | Unpooling parameter descriptor |
int csinn_unstack | ( | struct csinn_tensor * | input, |
struct csinn_tensor ** | output, | ||
struct csinn_unstack_params * | params | ||
) |
Unstack input tensor.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Unstack parameter descriptor |
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.
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.
[in] | condition | Pointer to the condition tensor |
[in] | x | Pointer to the x tensor |
[in] | y | Pointer to the y tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Where parameter descriptor |
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.
[in] | condition | Pointer to the condition tensor |
[in] | y | Pointer to the y tensor |
[out] | output | Pointer to the output tensor |
[in] | params | Where parameter descriptor |
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.
[in] | input0 | Pointer to the input0 tensor |
[in] | input1 | Pointer to the input1 tensor |
[out] | output | Pointer to the output tensor |
[in] | params | XOR parameter descriptor |
int csinn_yuv_rgb_scale | ( | struct csinn_tensor * | input, |
struct csinn_tensor * | output, | ||
struct csinn_siso_params * | params | ||
) |
Convert YUV to RGB.
[in] | input | Pointer to the input tensor |
[out] | output | Pointer to the output tensor |
[in] | params | YUV RGB scale parameter descriptor |