当前位置:网站首页>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())
边栏推荐
- @Jsonbackreference and @jsonmanagedreference (solve infinite recursion caused by bidirectional references in objects)
- C语言双指针——经典题型
- [NVIDIA development board] FAQ (updated from time to time)
- 电脑清理,删除的系统文件
- What is the role of automated testing frameworks? Shanghai professional third-party software testing company Amway
- On the inverse order problem of 01 knapsack problem in one-dimensional state
- JVM quick start
- LeetCode:剑指 Offer 04. 二维数组中的查找
- vb.net 随窗口改变,缩放控件大小以及保持相对位置
- LeetCode:673. 最长递增子序列的个数
猜你喜欢
C语言双指针——经典题型
MySQL learning record 11jdbcstatement object, SQL injection problem and Preparedstatement object
Bottom up - physical layer
可变长参数
pytorch训练好的模型在加载和保存过程中的问题
C語言雙指針——經典題型
LeetCode:236. 二叉树的最近公共祖先
Current situation and trend of character animation
Computer graduation design PHP Zhiduo online learning platform
Indentation of tabs and spaces when writing programs for sublime text
随机推荐
[embedded] print log using JLINK RTT
Browser thread
LeetCode:41. 缺失的第一个正数
hutool优雅解析URL链接并获取参数
电脑F1-F12用途
游戏解包的危害及资源加密的重要性
企微服务商平台收费接口对接教程
@JsonBackReference和@JsonManagedReference(解决对象中存在双向引用导致的无限递归)
vb.net 随窗口改变,缩放控件大小以及保持相对位置
What are the common processes of software stress testing? Professional software test reports issued by companies to share
Esp8266-rtos IOT development
TDengine 社区问题双周精选 | 第三期
egg. JS directory structure
Crash problem of Chrome browser
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
LeetCode:26. 删除有序数组中的重复项
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
Warning in install. packages : package ‘RGtk2’ is not available for this version of R
Deep analysis of C language data storage in memory
Light of domestic games destroyed by cracking