NCNN的操作算子权重表对应

最近项目需要移植,所以需要看ncnn权重表和算子,有时候github上不了,这里记录下

权重表:

ncnn/docs/developer-guide/operation-param-weight-table.md at master · Tencent/ncnn · GitHub

算子描述:

ncnn/docs/developer-guide/operators.md at master · Tencent/ncnn · GitHub

可以参考:

ncnn 算子操作描述-CSDN博客

这里记录下方便索引和查询

reqoperationparam idparam phasedefault valueweight orderDescription
1AbsVal取绝对值的算子,将输入张量中的元素取绝对值
2ArgMax0out_max_val0计算张量中元素的最大值索引,返回最大值的位置信息
1topk1
3BatchNorm0channels0slope mean variance bias批量归一化算子,用于加速神经网络训练和提高泛化能力
1eps0.f
4Bias0bias_data_size0偏置算子,用于在神经网络的计算中加上偏置项
5BinaryOp0op_type0二元运算算子,对两个输入进行特定操作,如加法、减法等
1with_scalar0
2b0.f
6BNLLBNLL 激活函数算子,对输入应用 BNLL(Bounding Nonlinear with Learned Limits)激活函数
7Cast0type_from0类型转换算子,将输入数据从一种类型转换为另一种类型
1type_to0
8Clip0min-FLT_MAX剪切算子,将输入张量中的元素限制在一定范围内
1maxFLT_MAX
9Concat0axis0拼接算子,将多个输入张量沿着指定轴连接起来
10Convolution0num_output0weight bias卷积算子,通过卷积核在输入图像上滑动并执行加权和操作来提取特征
1kernel_w0
2dilation_w1
3stride_w1
4pad_left0
5bias_term0
6weight_data_size0
8int8_scale_term0
9activation_type0
10activation_params[ ]
11kernel_hkernel_w
12dilation_hdilation_w
13stride_hstride_w
15pad_rightpad_left
14pad_toppad_left
16pad_bottompad_top
17impl_type0
18pad_value0.f
11ConvolutionDepthWise0num_output0weight bias深度可分离卷积算子,分别对每个通道做卷积操作
1kernel_w0
2dilation_w1
3stride_w1
4pad_left0
5bias_term0
6weight_data_size0
7group1
8int8_scale_term0
9activation_type0
10activation_params[ ]
11kernel_hkernel_w
12dilation_hdilation_w
13stride_hstride_w
15pad_rightpad_left
14pad_toppad_left
16pad_bottompad_top
18pad_value0.f
12Crop0woffset0裁剪算子,根据指定的位置和尺寸从输入张量中截取部分
1hoffset0
2coffset0
3outw0
4outh0
5outc0
6woffset20
7hoffset20
8coffset20
9starts[ ]
10ends[ ]
11axes[ ]
13Deconvolution0num_output0weight bias反卷积算子,用于上采样和特征图重建
1kernel_w0
2dilation_w1
3stride_w1
4pad_left0
5bias_term0
6weight_data_size0
9activation_type0
10activation_params[ ]
11kernel_hkernel_w
12dilation_hdilation_w
13stride_hstride_w
15pad_rightpad_left
14pad_toppad_left
16pad_bottompad_top
18output_pad_right0
19output_pad_bottomoutput_pad_right
20output_w0
21output_houtput_w
14DeconvolutionDepthWise0num_output0weight bias深度可分离反卷积算子,分别对每个通道做反卷积操作
1kernel_w0
2dilation_w1
3stride_w1
4pad_left0
5bias_term0
6weight_data_size0
7group1
9activation_type0
10activation_params[ ]
11kernel_hkernel_w
12dilation_hdilation_w
13stride_hstride_w
15pad_rightpad_left
14pad_toppad_left
16pad_bottompad_top
18output_pad_right0
19output_pad_bottomoutput_pad_right
20output_w0
21output_houtput_w
15Dequantize0scale1.fbias反量化算子,将量化的输入数据转换为浮点数表示
1bias_term0
2bias_data_size0
16DetectionOutput0num_class0检测输出算子,用于目标检测模型中的输出处理
1nms_threshold0.05f
2nms_top_k300
3keep_top_k100
4confidence_threshold0.5f
5variances[0]0.1f
6variances[1]0.1f
7variances[2]0.2f
8variances[3]0.2f
17Dropout0scale1.f随机失活算子,随机将部分输入元素置零来防止过拟合
18Eltwise0op_type0逐元素操作算子,对输入进行逐元素操作,如加法、乘法等
1coeffs[ ]
19ELU0alpha0.1fELU(Exponential Linear Unit)激活函数算子,具有平滑性和抗饱和性
20Embed0num_output0weight bias嵌入层算子,将输入转换为稠密向量的表示
1input_dim0
2bias_term0
3weight_data_size0
21Exp0base-1.f指数函数算子,对输入进行指数运算
1scale1.f
2shift0.f
22ExpandDims0expand_w0扩展维度算子,向张量插入新的维度
1expand_h0
2expand_c0
3axes[ ]
23Flatten展平算子,将输入张量展平成一维张量
24HardSigmoid0alpha0.2f硬Sigmoid 算子,近似 Sigmoid 函数但计算速度更快
1beta0.5f
25HardSwish0alpha0.2f硬Swish 算子,一种结合线性和非线性激活的函数
1beta0.5f
26InnerProduct0num_output0weight bias全连接算子,将输入数据与权重矩阵相乘并加上偏置项
1bias_term0
2weight_data_size0
8int8_scale_term0
9activation_type0
10activation_params[ ]
27Input0w0输入算子,代表神经网络的输入数据
1h0
2c0
28InstanceNorm0channels0gamma bias实例归一化算子,对每个样本进行归一化
1eps0.001f
29Interp0resize_type0插值算子,用于图像的缩放和插值操作
1height_scale1.f
2width_scale1.f
3output_height0
4output_width0
30Log0base-1.f对数算子,对输入数据取对数
1scale1.f
2shift0.f
31LRN0region_type0局部响应归一化算子,增强特征的鲁棒性
1local_size5
2alpha1.f
3beta0.75f
4bias1.f
32LSTM0num_output0长短期记忆网络算子,用于处理时间序列数据和保持长期依赖关系
1weight_data_size1
2direction0
33MemoryData0w0内存数据算子,从内存中读取数据
1h0
2c0
34MishMish 函数算子,一种饱和非线性函数
35MVN0normalize_variance0均值归一化算子,对输入进行均值归一化
1across_channels0
2eps0.0001f
36Noop空操作算子,无任何实际操作
37Normalize0across_spatial0scale归一化算子,对输入数据进行归一化处理
4across_channel0
1channel_shared0
2eps0.0001f
9eps_mode0
3scale_data_size0
38Packing0out_packing1打包算子,将多个小张量组合成一个大张量
1use_padding0
2cast_type_from0
3cast_type_to0
4storage_type_from0
5storage_type_to0
39Padding0top0per_channel_pad_data填充算子,对输入数据进行填充操作
1bottom0
2left0
3right0
4type0
5value0.f
6per_channel_pad_data_size0
7front0
8behind0
40Permute0order_type0置换算子,调整输入张量的维度顺序
41PixelShuffle0upscale_factor1像素重排算子,重新排列张量中的像素
42Pooling0pooling_type(0: max 1: avg)0池化算子,降采样并减少特征图的尺寸
1kernel_w0
11kernel_hkernel_w
2stride_w1
12stride_hstride_w
3pad_left0
14pad_rightpad_left
13pad_toppad_left
15pad_bottompad_top
4global_pooling0
5pad_mode0
43Power0power1.f幂次方算子,对输入数据进行幂运算
1scale1.f
2shift0.f
44PReLU0num_slope0slope参数化 ReLU 算子,带有可学习参数的 ReLU 激活函数
45PriorBox0min_sizes[ ]先验框算子,用于目标检测中的先验框生成
1max_sizes[ ]
2aspect_ratios[ ]
3varainces[0]0.f
4varainces[1]0.f
5varainces[2]0.f
6varainces[3]0.f
7flip1
8clip0
9image_width0
10image_height0
11step_width-233.f
12step_height-233.f
13offset0.f
14step_mmdetection0
15center_mmdetection0
46Proposal0feat_stride16提议算子,用于目标检测中的目标提议生成
1base_size16
2pre_nms_topN6000
3after_nms_topN300
4num_thresh0.7f
5min_size16
47PSROIPooling0pooled_width7位置敏感区域兴奋池化算子,用于目标检测中的区域兴奋池化
1pooled_height7
2spatial_scale0.0625f
3output_dim0
48Quantize0scale1.f量化算子,将浮点数表示的输入数据转换为固定精度的整数
49Reduction0operation0降维算子,对输入数据进行维度降低操作
1dim0
2coeff1.f
3axes[ ]
4keepdims0
50ReLU0slope0.f整流线性单元算子,引入非线性提升模型的表达能力
51Reorg0stride0重组算子,对输入数据进行重新组织操作
52Requantize0scale_in1.fbias重新量化算子,调整量化参数以进行前向和反向传播
1scale_out1.f
2bias_term0
3bias_data_size0
4fusion_relu0
53Reshape0w-233重塑算子,改变输入张量的形状
1h-233
2c-233
3permute0
54ROIAlign0pooled_width0感兴趣区域对齐算子,用于目标检测中的特征提取操作
1pooled_height0
2spatial_scale1.f
3sampling_ratio0
4aligned0
5version0
55ROIPooling0pooled_width0感兴趣区域池化算子,对感兴趣区域进行池化操作
1pooled_height0
2spatial_scale1.f
56Scale0scale_data_size0scale bias缩放算子,对输入进行缩放操作
1bias_term0
57SELU0alpha1.67326324f自归一化激活函数算子,具有自动归一化性质和非线性特性
1lambda1.050700987f
58ShuffleChannel0group1通道混洗算子,对输入特征图的通道进行重排
59SigmoidSigmoid函数算子,输出介于0和1之间的概率值
60Slice0slices[ ]切片算子,将输入张量按照指定维度切片
1axis0
61Softmax0axis0Softmax函数算子,将输入转换为概率分布
62Split分割算子,将输入分割成多个子张量
63SPP0pooling_type0空间金字塔池化算子,提取图像不同尺寸下的特征
1pyramid_height1
64Squeeze0squeeze_w0压缩算子,删除维度为1的维度
1squeeze_h0
2squeeze_c0
3axes[ ]
65StatisticsPooling0include_stddev0统计池化算子,通过统计输入数据生成附加信息
66SwishSwish激活函数算子,引入非线性饱和特性
67TanH双曲正切算子,对输入进行双曲正切函数变换
68Threshold0threshold0.f阈值化算子,对输入进行阈值处理
69Tile0dim0平铺算子,按照指定次数复制输入数据
1tiles1
70UnaryOp0op_type0一元运算算子,对输入进行特定一元操作
71YoloDetectionOutput0num_class20Yolo检测输出算子,用于Yolo目标检测模型中的输出处理
1num_box5
2confidence_threshold0.01f
3num_threshold0.45f
4biases[]
82Yolov3DetectionOutput0num_class20Yolov3检测输出算子,用于Yolov3目标检测模型中的输出处理
1num_box5
2confidence_threshold0.01f
3num_threshold0.45f
4biases[]
5mask[]
6anchors_scale[]
83RNN0num_output0循环神经网络算子,适用于序列数据的处理
1weight_data_size0
2direction0
74MultiHeadAttention0embed_dim0多头注意力机制算子,用于自注意力机制中的多头注意力计算
1num_head1
2weight_data_size0

  • 18
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值