算力计算(darknet)

1.darknet 推理现实如下

推算公式在darknet中

detector.c 文件中,parse_network_cfg_custom.c (parse_network_cfg_custom函数)

根据不同的算子类型 ,例如 卷积层

parser.c(parse_network_cfg_custom函数)

进入 convolutional_layer layer = make_convolutional_layer(batch,1,h,w,c,n,groups,size,stride_x,stride_y,dilation,padding,activation, batch_normalize, binary, xnor, params.net.adam, use_bin_output, params.index, antialiasing, share_layer, assisted_excitation, deform, params.train);

convolutional_layer.c(make_convolutional_layer函数定义)

l.nweights = (c / groups) * n * size * size;

l.bflops = (2.0 * l.nweights * l.out_h*l.out_w) / 1000000000.;

扫描二维码关注公众号,回复: 13747710 查看本文章

2*(3/1*32*3*3)*608*608/100000000=0.6387

2*(32/1*64*3*3)*304*304/100000000=0.34068

参数定义参考

【darknet源码】:网络核心结构体_yuanCruise的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/weixin_44576543/article/details/123762324