当前位置:网站首页>Number of parameters of pytorch statistical model
Number of parameters of pytorch statistical model
2022-06-13 08:53:00 【Knife, kesselamo】
- Is to traverse every parameter , Add up the size
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
paras=torch.load('weights.pth', map_location=device)
count = 0
for k2 in paras:
l = list(paras[k2].size())
temporary = 1
for i in l:
temporary *= i
count += temporary
print(count)
边栏推荐
- On the use of regular expressions (bracket problem)
- 1、 JS introduction
- Logstash configuration reference article
- 1. preliminary understanding of Express
- redis
- 8、 JS data type conversion
- ADT Google browser plug-in ad Terminator
- 【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握
- JS - simple ATM of the for cycle case
- Emotion handling skills
猜你喜欢

DIY无人机(匿名拓控者P2+F330机架)

Basic use of cesium, including loading images, terrain, models, vector data, etc

Cesium displays a pop-up box at the specified position and moves with the map

【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握

【安全】零基础如何从0到1逆袭成为安全工程师

4、 Js-es5-i / O

Browser render passes

A solution to create a new EXCEL workbook on win10 computer and change the suffix to xlsm (normally it should be xlsx)
![WARNING:tornado. access:404 GET /favicon. ICO (172.16.8.1) 1.84ms [with static file settings]](/img/6d/6eef1f0ebcab45e9a209a3b6c62b03.png)
WARNING:tornado. access:404 GET /favicon. ICO (172.16.8.1) 1.84ms [with static file settings]

redis
随机推荐
4. Relationship selector (parent-child relationship, ancestor offspring relationship, brother relationship)
Cesium common events, including click events, mouse events, and camera movement events
14. class initialization, default constructor, =default
[leetcode weekly race record] record of the 80th biweekly race
【安全】零基础如何从0到1逆袭成为安全工程师
What is the difference between getfullyear() and getyear()
Undefined and null in JS
【Pycharm踩坑记录】配置远程运行后提示,[Errno 2] No such file or directory
WARNING:tornado.access:404 GET /favicon.ico (172.16.8.1) 1.84ms [附静态文件设置]
Pytorch model tuning - only some layers of the pre training model are loaded
Cesium achieves sunny, rainy, foggy, snowy and other effects
ADT Google browser plug-in ad Terminator
Problems in the deconstruction and assignment of objects, comparison between empty strings and undefined
Three methods to make the scroll bar of div automatically scroll to the bottom
How to save the video of wechat video number locally?
Web page H5 wechat sharing
redis.exceptions.ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
Paging query template of Oracle
0.一些自己初學Solidworks的疑惑
GBase 常见网络问题及排查方法