当前位置:网站首页>yolov3 data reading (2)
yolov3 data reading (2)
2022-08-04 06:06:00 【Big Yellow Cat No. 1】
The previous article will write the yolov3 network layer parameters loaded.
Here are several structures that play a big role in the linked list in yolov3:
typedef struct list{int size;node *front;node *back;} list;typedef struct node{void *val;struct node *next;struct node *prev;} node;typedef struct{char *key;char *val;int used;} kvp;typedef struct{char *type;list *options;}section;
Look at the next program in the network parse_network_cfg_custom(char *filename, int batch) function in the parser.c file:
node *n = sections->front;if(!n) error("Config file has no sections");network net = make_network(sections->size - 1);net.gpu_index = gpu_index;size_params params;section *s = (section *)n->val;list *options = s->options;if(!is_network(s)) error("First section must be [net] or [network]");parse_net_options(options, &net);params.h = net.h;params.w = net.w;params.c = net.c;params.inputs = net.inputs;if (batch > 0) net.batch = batch;params.batch = net.batch;params.time_steps = net.time_steps;params.net = net;float bflops = 0;size_t workspace_size = 0;
It can be seen that *n represents the first network layer of the yolov3 network[net], in the third line the author creates a network (see network in network.h for details) to storeAll parameters of a network layer, sections->size-1, n in the visible net starts from zero.A size_params structure is initialized on the fifth line to store the information of the input image in a network layer.
The following procedure in network parse_network_cfg_custom(char *filename, int batch) is to read the rest of the layers except the first layer into other *n,
边栏推荐
猜你喜欢
随机推荐
Redis持久化方式RDB和AOF详解
[Introduction to go language] 12. Pointer
剑指 Offer 2022/7/12
The pipeline mechanism in sklearn
ReentrantLock(公平锁、非公平锁)可重入锁原理
yolov3数据读入(二)
安装dlib踩坑记录,报错:WARNING: pip is configured with locations that require TLS/SSL
剑指 Offer 2022/7/4
剑指 Offer 2022/7/5
k3s-轻量级Kubernetes
Polynomial Regression (PolynomialFeatures)
【深度学习21天学习挑战赛】0、搭建学习环境
oracle的number与postgresql的numeric对比
sklearn中的pipeline机制
SQL练习 2022/7/3
字典特征提取,文本特征提取。
Install dlib step pit record, error: WARNING: pip is configured with locations that require TLS/SSL
lmxcms1.4
剑指 Offer 2022/7/1
SQl练习 2022/6/29