当前位置:网站首页>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)
边栏推荐
- Mapbox usage, including drawing, loading, modifying, deleting points and faces, displaying pop ups, etc
- 如何成为白帽子黑客?我建议你从这几个阶段开始学习
- Map 23 summary
- Form exercise 2
- turf. JS usage
- Wrap dynamically created child elements in dynamically created structures
- 7、 JS data type
- Logstash configuration reference article
- Animation through svg
- Container concept and cloud native
猜你喜欢
Mapbox usage, including drawing, loading, modifying, deleting points and faces, displaying pop ups, etc
anaconda下安装pytorch
Container concept and cloud native
Vscode define code block -- define cursor position
Docker installing MySQL local remote connection docker container MySQL
JS - set countdown for Date object case
Replace jade engine with EJS
On the use of regular expressions (bracket problem)
Knowledge points related to system architecture 1
[pychart pit stepping record] prompt after configuring remote operation, [errno 2] no such file or directory
随机推荐
Cesium view switching, locating, reading files, building data sources, entity control, model control, etc
0. Quelques doutes au sujet de SolidWorks
ES6 use of dynamic attributes
网上开户安全吗?新手可以开账户吗?
Vscode plug in
Cesium displays a pop-up box at the specified position and moves with the map
Object array de encapsulation
JS obtain geographic location information according to longitude and latitude and mark it on the map
Knowledge points related to system architecture 2
About RSA encryption and decryption principle
5、 Constant, variable
4. Relationship selector (parent-child relationship, ancestor offspring relationship, brother relationship)
Tmall product details interface, tmall product coupon interface, tmall API interface, tmall price monitoring interface, tmall price comparison interface, brand rights protection interface, tmall sales
Four kinds of hooks in deep learning
JS - max. of array cases
DIY无人机(匿名拓控者P2+F330机架)
Form exercise 2
容器概念和云原生
Knowledge points related to system architecture 3
0.一些自己初學Solidworks的疑惑