关于GMac和FLOPs讨论
FLOPs: s小写,指浮点运算数,理解为计算量。可以用来衡量算法/模型的复杂度。(模型) 在论文中常用GFLOPs
(1 GFLOPs = 10^9 FLOPs)10亿次浮点运算数
(1 MFLOPs = 10^6 FLOPs)1百万次浮点运算数
一个MFLOPS(megaFLOPS)等于每秒一百万(=10^6)次的浮点运算,
一个GFLOPS(gigaFLOPS)等于每秒十亿(=10^9)次的浮点运算,
一个TFLOPS(teraFLOPS)等于每秒一万亿(=10^12)次的浮点运算,(1太拉)
一个PFLOPS(petaFLOPS)等于每秒一千万亿(=10^15)次的浮点运算,
一个EFLOPS(exaFLOPS)等于每秒一百京(=10^18)次的浮点运算,
一个ZFLOPS(zettaFLOPS)等于每秒十万京(=10^21)次的浮点运算。
https://github.com/sovrasov/flops-counter.pytorch
with torch.cuda.device(0):
macs, params = get_model_complexity_info(model, (3, 256, 192), as_strings=True,print_per_layer_stat=True, verbose=True)print('{:<30} {:<8}'.format('Computational complexity: ', macs))print('{:<30} {:<8}'.format('Number of parameters: ', params))
关于GMACs = GFLOPs讨论https://github.com/sovrasov/flops-counter.pytorch/issues/16
回答:
is there a typo here? I did a little reading and it seems that @snownus has it right. In general a multiply-accumulate is one multiplication and one addition, which can each be floating point operations. So 1 GMAC counts as 2 GFLOPs, meaning GMACs = .5 * GFLOPs (I’m not sure if this is what was already meant).
As for fused multiply-add (FMA) it seems that (if it is supported on a given chip/system) the two FLOPs are indeed computed “in a single step” (see here) or “at once” (see here). But this confuses our conversion. Perhaps in the case of FMA it is more accurate to say 1 GMACs = 1 GFLOPs? Hopefully someone with more expertise than me can clarify!
Params(M) MACs(G)
HRNet-W32 256×192实测
Computational complexity: 7.7 GMac
Number of parameters: 28.54 M
HRNet-W32256×192
论文中7.10 GFLOPs
关于GMac和FLOPs讨论相关推荐
- 工作日报http://www.cnblogs.com/suyang/archive/2008/05/18/1201990.html
2014-9-18: 1.制定计划表,还需要修改一下.--没完成. 2.otg修改的代码编译通过,基于该代码调试gadget成功.-- 这上面消耗时间较多,明天首要任务是将其上库,不要讲代码捏在手里, ...
- 【论文简述及翻译】A ConvNet for the 2020s(CVPR 2022)
一.论文简述 1. 第一作者:Zhuang Liu 2. 发表年份:2022 3. 发表期刊:CVPR 4. 关键词:ConvNet.Transformers.CNNs.数据集 5. 探索动机:在20 ...
- CNN 模型的参数(parameters)数量和浮点运算数量(FLOPs)是怎么计算的
文章目录: 1 模型参数(parameters)的个数 1.1 模型参数介绍 1.2 常见网络的模型参数个数 1.2 举例如何计算神经网络模型参数 2 FLOPS:每秒浮点运算次数 2.1 `FLOP ...
- 测试方法介绍-计算模型复杂度(GMac)、模型大小(M)、计算速度(FPS)
PRNet-V 计算复杂度为 48.76GMac 参数数量为34.73M (PRNet测试结果)(IEO在12345层) 参数数量为27.57M (PRNet测试结果)(IEO在345层) 计算图片读 ...
- 【读点论文】A ConvNet for the 2020s,结合swin transformer的结构设计和训练技巧调整resnet网络,在类似的FLOPs和参数量取得更好一点的效果
A ConvNet for the 2020s Abstract 视觉识别的"咆哮的20年代"始于视觉transformer(ViTs)的问世,它迅速取代ConvNets成为最先进 ...
- DMIPS, TOPS, FLOPS, FLOPs, GMACs, FMA
FLOPS MFLOPS GFLOPS TFLOPS PFLOPS GFLOPS是Paper里比较流行的单位. MFLOPS Mega(106)/Giga(109)/Tera(1012)/Peta(1 ...
- 【深度学习】深度学习中模型计算量(FLOPs)和参数量(Params)等的理解以及四种在python应用的计算方法总结
接下来要分别概述以下内容: 1 首先什么是参数量,什么是计算量 2 如何计算 参数量,如何统计 计算量 3 换算参数量,把他换算成我们常用的单位,比如:mb 4 对于各个经典网络,论述他们是计算量大还 ...
- 干货 Flops Mutli-adds MACs
名词解释 ** FLOPS\color{red}{FLOPS}FLOPS:** ALL UPPERCASE(均大写),floating point operations per second的缩写,意 ...
- 面试宝典笔记:卷积计算过程中的FLOPs
模型的运算次数,可用 FLOPs衡量,也就是浮点运算次数(FLoating-point OPerations),表征的是模型的时间复杂度.模型空间复杂度通过Parameters反映,即模型的参数量. ...
最新文章
- Spring Cloud应用开发(一:使用Eureka注册服务)
- python 搭建的http 动态服务器_Python 创建HTTP服务器的简单示例
- 进一步理解:inline-block,vertical-align,line-height
- Java中的双重检查锁定
- JavaScript之定义函数的方法
- android 中tools命名空间的全解
- jspstudy启动mysql失败_JspStudy配置Jspxcms安装教程,以及数据库设置;
- Python3入门视频教程百度网盘
- 微信将可开小号!微信内测一个手机可注册俩号
- 【板栗糖GIS】如何重复利用arcmap图层的符号样式
- 91m2中对DB进行了一次封装的DBHelpUtil工具类
- 区块链安全:实现公链双花攻击的多种方法
- R语言——数据格式和数据读取
- 【PR #2】史莱姆(值域分段)
- 查看oracle关闭重启,oracle 数据库关闭重启
- 8个免费的高质量UI图标大全网站
- hbuilder 打包 php,HBuilder 打包流程
- 异常:Class net.sf.cglib.core.DebuggingClassWriter overrides final method visit
- 一个可以给文件添加备注信息的小工具
- 易语言 爬虫 网络请求 保存图片