当前位置:网站首页>ncnn param文件及bin模型可视化解析
ncnn param文件及bin模型可视化解析
2022-07-17 00:17:00 【HySmiley】
param文件
内容

第一行【7767517】版本信息
第二行【79 87】layer数及blob数
layer数指:input、Convolution、BatchNorm、ReLU。。。 等数目

其实就是打开文件时去除前两行剩余行数 即81-2=79
blob数指 中间产生结构分支等数目。
bin文件可视化
用netron打开

param文件与bin模型网络结构对应关系

具体对应关系如Convolution 层:
Convolution :层类型
Conv_0 :层名称
1:输入数据结构数量
1:输出数据结构数量
input :网络输入层名
123 :网络输出层名output(部分结构层名由数字代替)
0=64:输出通道数-num_output
1=7 、11=7:卷积核尺寸-kernel_h/kernel_w
2=1、 12=1 :扩大-dilation_h/dilation_w
3=2、 13=2 :步长-stride_h/stride_w
4=3、 14=3 :pad-left /pad-right
15=3、 16=3 :pad-top/pad-bottom
5=0 :bias-term
6=9408(7*7*64*3) 总参数量k*k*in*out
以key=value形式说明,其中1=7,11=7都表示卷积核,第二个key值+10用以区分,步长、pad类似
本质上是卷积层函数参数
如nn.Conv2d函数
初始化参数
def __init__(
self,
in_channels: int,
out_channels: int,
kernel_size: _size_2_t,
stride: _size_2_t = 1,
padding: Union[str, _size_2_t] = 0,
dilation: _size_2_t = 1,
groups: int = 1,
bias: bool = True,
padding_mode: str = 'zeros', # TODO: refine this type
device=None,
dtype=None
)
边栏推荐
猜你喜欢
随机推荐
Changes of service account in kubernetes1.24
mysqldump: [Warning] Using a password on the command line interface can be insecure.
HCIA's first static routing experiment
Expect interaction free
使用gatekeeper限制kubernetes创建特定类型的资源
认识交换机以及作用
RHCE学习指南 第5章 vim编辑器
Leetcode 1: Two Sum
Conditional statement of shell script
Unicast、Multicast、Broadcast
Shell script variables, script writing and execution (deploy Apache and remote backup MySQL database)
Echo -e usage
What happens when you get stuck compiling and installing MySQL database in Linux system?
[redis] what is progressive rehash
Let's learn about awk~
Squid agent service deployment
Swing swing ~ firewall
Binary installation kubernetes 1.23.2
A preliminary study of MySQL
ELK日志分析系统








