当前位置:网站首页>pytorch查看张量占用内存大小
pytorch查看张量占用内存大小
2022-07-06 08:46:00 【保住头发的破风小子】
element_size
返回单个元素的字节大小,nelement
返回元素个数
import torch
a = torch.zeros([128, 128])
print(a.element_size() * a.nelement())
a = torch.zeros([256, 256])
print(a.element_size() * a.nelement())
边栏推荐
- Image,cv2读取图片的numpy数组的转换和尺寸resize变化
- 【嵌入式】Cortex M4F DSP库
- UnsupportedOperationException异常
- LeetCode:剑指 Offer 48. 最长不含重复字符的子字符串
- Research Report on Market Research and investment strategy of microcrystalline graphite materials in China (2022 Edition)
- LeetCode:劍指 Offer 42. 連續子數組的最大和
- What is the role of automated testing frameworks? Shanghai professional third-party software testing company Amway
- 电脑清理,删除的系统文件
- Navicat Premium 创建MySql 创建存储过程
- Roguelike game into crack the hardest hit areas, how to break the bureau?
猜你喜欢
LeetCode:124. 二叉树中的最大路径和
Indentation of tabs and spaces when writing programs for sublime text
View computer devices in LAN
Delay initialization and sealing classes
Simple use of promise in uniapp
C語言雙指針——經典題型
软件卸载时遇到trying to use is on a network resource that is unavailable
Unified ordering background interface product description Chinese garbled
Problems in loading and saving pytorch trained models
深度剖析C语言数据在内存中的存储
随机推荐
pcd转ply后在meshlab无法打开,提示 Error details: Unespected eof
Navicat premium create MySQL create stored procedure
Hutool gracefully parses URL links and obtains parameters
Image,cv2读取图片的numpy数组的转换和尺寸resize变化
JVM quick start
LeetCode:剑指 Offer 42. 连续子数组的最大和
优秀的软件测试人员,都具备这些能力
Variable length parameter
[NVIDIA development board] FAQ (updated from time to time)
China high purity silver nitrate Market Research and investment strategy report (2022 Edition)
LeetCode:剑指 Offer 03. 数组中重复的数字
LeetCode:162. 寻找峰值
LeetCode:41. 缺失的第一个正数
Warning in install. packages : package ‘RGtk2’ is not available for this version of R
Charging interface docking tutorial of enterprise and micro service provider platform
个人电脑好用必备软件(使用过)
egg. JS getting started navigation: installation, use and learning
Problems in loading and saving pytorch trained models
Roguelike游戏成破解重灾区,如何破局?
超高效!Swagger-Yapi的秘密