当前位置:网站首页>深度学习中的FLOPs和Params如何计算
深度学习中的FLOPs和Params如何计算
2022-06-26 10:20:00 【captain飞虎大队】
仅作为记录,大佬请跳过。
当model读取后,使用:
from thop import profile
dummy_input = torch.randn(1, 3, 224, 224)
flops, params = profile(model, (dummy_input,))
print('flops: ', flops, 'params: ', params)
print('flops: %.2f M, params: %.2f M' % (flops / 1000000.0, params / 1000000.0))
即可。
如resnet-101的:
参考
边栏推荐
- That is to say, "live broadcast" is launched! One stop live broadcast service with full link upgrade
- April 13, 2021 interview with beaver family
- 动态规划解决股票问题(下)
- Huawei secoclient reports an error "accept return code timeout" [svn adapter v1.0 exclamation point]
- Matrix fast power notes
- Wangeditor uploading local video modification
- UDP flood attack defense principle
- Nacos2.x.x start error creating bean with name 'grpcclusterserver';
- Concise course of probability theory and statistics in engineering mathematics second edition review outline
- How does unity prevent other camera positions and rotations from being controlled by steamvrplugin when using steamvrplugin
猜你喜欢
Alibaba cloud OSS - object storage service (tool)
Code specification & explain in detail the functions and uses of husky, prettier, eslint and lint staged
Machine learning deep neural network -- Experimental Report
滑动窗口
SVN 安装配置
nacos2.x.x启动报错信息Error creating bean with name ‘grpcClusterServer‘;
Concise course of probability theory and statistics in engineering mathematics second edition review outline
机器学习线性回归——实验报告
【北邮果园微处理器设计】10 Serial Communication 串口通信笔记
2、 Linear table
随机推荐
dd命令测试华为鲲鹏&宏衫固态存储磁盘读写速度
Fabric. JS upper dash, middle dash (strikethrough), underline
9、 Beautify tables, forms, and hyperlinks
Common regular expressions - tool classes (mobile number, email, QQ, fax)
最强swarm集群一键部署+氢弹级容器管理工具介绍
机器学习深度神经网络——实验报告
Machine learning PCA - Experimental Report
Will updating a large amount of data in Oracle cause the undo space to explode
Laravel admin obtains non auto increment ID and submits hidden forms
工作汇报(2)
4、 Stacks and queues
Unity使用SteamVRPlugin时如何不让其他Camera位置和旋转收到SteamVRPlugin控制
滑动窗口
Code specification & explain in detail the functions and uses of husky, prettier, eslint and lint staged
LeetCode 710 黑名单中的随机数[随机数] HERODING的LeetCode之路
[Beiyou orchard microprocessor design] 10 serial communication serial communication notes
Docker中实现MySQL主从复制
Using baijiafan to automatically generate API calls: progress in JS (II)
The difference between NPM and yarn
c语言 --- 运算符和表达式