当前位置:网站首页>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,
边栏推荐
猜你喜欢
随机推荐
组原模拟题
flink问题整理
k9s-终端UI工具
TensorFlow:tf.ConfigProto()与Session
Polynomial Regression (PolynomialFeatures)
SQL练习 2022/7/2
(九)哈希表
pgsql函数中的return类型
IvNWJVPMLt
sklearn中的pipeline机制
属性动画的用法 以及ButterKnife的用法
数据库根据提纲复习
CAS与自旋锁、ABA问题
TensorFlow2学习笔记:6、过拟合和欠拟合,及其缓解方案
SQL练习 2022/7/4
oracle的number与postgresql的numeric对比
自动化运维工具Ansible(5)流程控制
flink-sql查询配置与性能优化参数详解
TensorFlow2学习笔记:8、tf.keras实现线性回归,Income数据集:受教育年限与收入数据集
android基础 [超级详细android存储方式解析(SharedPreferences,SQLite数据库存储)]