当前位置:网站首页>Cute image classification -- a general explanation of the article "what are the common flops in CNN model?"
Cute image classification -- a general explanation of the article "what are the common flops in CNN model?"
2022-07-27 13:27:00 【Dance rain】
《CNN Common in the model flops What is it 》
Let me write it out front
Reading recently CNN Various papers of , We found an index called flops It can be said that every paper must see , Even when comparing models , This flops It is also almost used . therefore , I can't help being right flops There was a strong interest in , After learning , I can't help but think of sharing what I have learned 、
Like this picture :

One 、 So what is FLOPs?
- FLOPS: Pay attention to all capitals , yes floating point operations per second Abbreviation , Floating point operations per second , It means computing speed . Is a measure of hardware performance .
- FLOPs: Be careful s A lowercase letter , yes floating point operations Abbreviation (s Plural ), It means floating point arithmetic , It means the amount of calculation . It can be used to measure the algorithm / The complexity of the model .
We all know : Let's go to the Evaluate a model When , The first element is, of course, to see this The accuracy of the model Acc.
But second , Different models achieve the same accuracy Acc The computational power required for forward propagation calculation may vary greatly , and flops It is this calculating power that may be very different , This reflects the hardware GPU Performance requirements .
such as : Arrive at the same 87% about Of Accuracy rate ,ConvNeXt Of FLOPs by 34.4G and Swin Transformer It is 103.9G!
besides :1) Parameter quantity ( It reflects the amount of memory occupied
2)throughout(image/s) ( It reflects the speed of model training
And so on are also very important indicators of the evaluation model
Two 、 How to calculate FLOPs?
Use FLOPs Open source library for Computing :

import torchvision.models as models
from flops counter import get model_complexity_info
net = models.vgg16
flops, params = get model complexity info(net, (224,224),as_strings=True, print per layer_stat=True)
print( FLops:0'.format(flops)
print('Params: '+params)The picture above —— Example code calculation VGG16 Of FLOPs And parameter quantities .
The following pictures —— Show the running results :


Several common models FLOPs And parameter quantity :

边栏推荐
- 写出一个程序,接受一个有字母和数字以及空格组成的字符串,和一个字符,然后输出输入字符串中含有该字符的个数。不区分大小写。
- What should I do if I can't see any tiles on SAP Fiori launchpad?
- leetcode——83,24;机器学习——神经网络
- Poj1273 drainage ditches [maximum flow] [SAP]
- Final solution for high collapse (no side effects)
- Icon Font
- Amd adrenalin 22.7.1 driver update: double the performance of OpenGL and support Microsoft win11 22h2 system
- v-on基础指令
- eBPF/Ftrace
- 初探基于OSG+OCC的CAD之任意多个子模型进行netgen以及gmsh网格划分
猜你喜欢

Minimally invasive brain science broke the listing: the company's market value is HK $14.3 billion, and minimally invasive medical is the major shareholder

2022年7月24日 暑假第二周训练

Preliminary discussion on NetGen and Gmsh mesh generation of any multiple sub models of CAD based on osg+occ

JNI程序如何进行参数传递
![51: Chapter 5: develop admin management services: 4: develop [add admin account, interface]; (only [user name + password, method]; [@t...] annotation controls transactions; when setting cookies, do yo](/img/6f/4f93eca1d923a58b2ef4b1947538be.png)
51: Chapter 5: develop admin management services: 4: develop [add admin account, interface]; (only [user name + password, method]; [@t...] annotation controls transactions; when setting cookies, do yo

Qt优秀开源项目之十三:QScintilla
![52: Chapter 5: developing admin management services: 5: developing [paging query admin account list, interface]; (swagger's @apiparam(), annotate the method parameters; PageHelper paging plug-in; Inte](/img/08/1cc315d568673a3892c20bc1254d38.png)
52: Chapter 5: developing admin management services: 5: developing [paging query admin account list, interface]; (swagger's @apiparam(), annotate the method parameters; PageHelper paging plug-in; Inte

使用碳刷的注意事项有哪些

Additional: [urlencoder.encode (string to be encoded, "encoding method");] (what is it?; why do we use this to encode when we set values in cookies?) (to be improved...)

Pat class B 1109 good at C (detailed)
随机推荐
W3School导航栏练习
MTK6765编译环境搭建
How to debug JNI program
完美指南|如何使用 ODBC 进行无代理 Oracle 数据库监控?
Calculates the length of the last word of the string, separated by spaces.
How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!
Application of responsibility chain model in transfer accurate valuation
Icon Font
Feign的整体流程
Can you tell me the difference between lateinit and lazy in kotlin?
Relative positioning
SQL GROUP BY语句
Perfect guide | how to use ODBC for agent free Oracle database monitoring?
What should I do if I can't see any tiles on SAP Fiori launchpad?
Realize the disk partition and file system mount of the newly added hard disk
最新版泛域名证书申请
接口测试实战教程01:接口测试环境搭建
开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能
Sff1004-mhchxm diode sff1004
计算字符串最后一个单词的长度,单词以空格隔开。