当前位置:网站首页>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,
边栏推荐
猜你喜欢
随机推荐
MySQL最左前缀原则【我看懂了hh】
自动化运维工具Ansible(4)变量
剑指 Offer 2022/7/5
SQL练习 2022/6/30
[NSSRound#1 Basic]
EPSON RC+ 7.0 使用记录一
(十)树的基础部分(一)
SQL练习 2022/7/1
pgsql函数中的return类型
IvNWJVPMLt
剑指 Offer 2022/7/1
TensorFlow2学习笔记:4、第一个神经网模型,鸢尾花分类
flink-sql所有数据类型
NFT市场以及如何打造一个NFT市场
Lombok的一些使用心得
(TensorFlow)——tf.variable_scope和tf.name_scope详解
Kubernetes基本入门-名称空间资源(三)
k3s-轻量级Kubernetes
Commons Collections2
【CV-Learning】线性分类器(SVM基础)