当前位置:网站首页>[ncnn] - the meaning of - 23300 in param
[ncnn] - the meaning of - 23300 in param
2022-04-23 03:01:00 【Nongfu mountain spring 2】
ncnn
1. -23300 It means
stay ncnn In the structural parameters of the model , Yes -23300
Parameters of , Such as :
code
Slice Split_394 1 2 886 887 888 -23330=8,3,40,40,80,3,40,40,32 -23300=2,80,-233
This means =
The following parameter is an array parameter ,2,80,-233
Express 2 A variable ,80,-233.
Code when parsing :
bool is_array = id <= -23300;
if (is_array)
{
id = -id - 23300;
}
if (id >= NCNN_MAX_PARAM_COUNT)
{
NCNN_LOGE("id < NCNN_MAX_PARAM_COUNT failed (id=%d, NCNN_MAX_PARAM_COUNT=%d)", id, NCNN_MAX_PARAM_COUNT);
return -1;
}
if (is_array)
{
int len = 0;
int nscan = dr.scan("%d", &len);
if (nscan != 1)
{
NCNN_LOGE("ParamDict read array length failed");
return -1;
}
- When parsing, it will pass
id = -id - 23300
, take id Set as 0.
2. -233 It means
here -233
The specific meaning of the value depends on the specific layer Defined in . such as slice layer
in :
int q = 0;
for(size_t i = 0; i < top_blobs.size(); i++)
{
int slice = slices_ptr[i];
if (slice == -233)
{
slice = static_cast<int>((channels - q) / (top_blobs.size() - i));
}
Mat& top_blob = top_blobs[i];
top_blob.create(w, h, slice, elemsize, opt.blob_allocator);
if (top_blob.empty())
return -100;
int size = static_cast<int>(bottom_blob.cstep * slice);
const unsigned char* ptr = bottom_blob.channel(q);
unsigned char* outptr = top_blob;
memcpy(outptr, ptr, size * elemsize);
q += slice;
}
This is equivalent to the average split.
版权声明
本文为[Nongfu mountain spring 2]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220633372085.html
边栏推荐
- Traversée de l'arbre L2 - 006
- Introduction to ACM [inclusion exclusion theorem]
- L2-006 樹的遍曆(中後序確定二叉樹&層序遍曆)
- Gavl021, gavl281, AC220V to 5v200ma small volume non isolated chip scheme
- 学习正则表达式选项、断言
- 《信息系统项目管理师总结》第四章 项目成本管理
- How can enterprises with major hazard installations ensure the completion of the digital construction task of double prevention mechanism by the end of the year
- Shell script learning notes - regular expressions
- OCR recognition PDF file
- HLS / chisel practice CORDIC high performance computing complex square root
猜你喜欢
Introduction to ACM [inclusion exclusion theorem]
Assembly learning Chapter III of assembly language (Third Edition) written by Wang Shuang
Flink learning (XI) watermark
tf. keras. layers. Embedding function
Niuke white moon race 6 [solution]
Q-Learning & Sarsa
Linux Redis ——Redis HA Sentinel 集群搭建详解 & Redis主从部署
The way to conquer C language
Onenet connection process
Kubernetes - Introduction to actual combat
随机推荐
FileNotFoundError: [Errno 2] No such file or directory
Navicat premium import SQL file
First knowledge of C language ~ branch statements
HLS / chisel uses CORDIC hyperbolic system to realize square root calculation
Android high-level interview must ask: overall business and project architecture design and reconstruction
Use of MySQL command line client and common commands
Huashu "deep learning" and code implementation: 01 Linear Algebra: basic concepts + code implementation basic operations
leangoo脑图-共享式多人协作思维导图工具分享
Shell script learning notes - regular expressions
Shell script learning notes -- shell operation on files sed
windows MySQL8 zip安装
《信息系统项目管理师总结》第七章 项目沟通管理
Winsock programming interface experiment: Ping
When using art template inheritance, compileerror: invalid or unexpected token generated
Codeforces round 784 (Div. 4) (a - H)
The problem of removing spaces from strings
Q-Learning & Sarsa
JS using the parameters of art template
JSON data text
The way to conquer C language