当前位置:网站首页>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())
边栏推荐
- 被破解毁掉的国产游戏之光
- hutool优雅解析URL链接并获取参数
- Computer graduation design PHP Zhiduo online learning platform
- TP-LINK enterprise router PPTP configuration
- Deep analysis of C language pointer
- 【嵌入式】Cortex M4F DSP库
- LeetCode:221. 最大正方形
- LeetCode:124. 二叉树中的最大路径和
- 软件卸载时遇到trying to use is on a network resource that is unavailable
- Deep analysis of C language data storage in memory
猜你喜欢

Fairguard game reinforcement: under the upsurge of game going to sea, game security is facing new challenges

Navicat premium create MySQL create stored procedure

Warning in install. packages : package ‘RGtk2’ is not available for this version of R

Esp8266-rtos IOT development

【ROS】usb_cam相机标定

Simple use of promise in uniapp
![[embedded] cortex m4f DSP Library](/img/83/ab421d5cc18e907056ec2bdaeb7d5c.png)
[embedded] cortex m4f DSP Library

Indentation of tabs and spaces when writing programs for sublime text

Navicat Premium 创建MySql 创建存储过程

sublime text的编写程序时的Tab和空格缩进问题
随机推荐
Marathon envs project environment configuration (strengthen learning and imitate reference actions)
LeetCode:221. 最大正方形
ROS compilation calls the third-party dynamic library (xxx.so)
marathon-envs项目环境配置(强化学习模仿参考动作)
Bitwise logical operator
超高效!Swagger-Yapi的秘密
Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
After PCD is converted to ply, it cannot be opened in meshlab, prompting error details: ignored EOF
C语言深度解剖——C语言关键字
Navicat Premium 创建MySql 创建存储过程
按位逻辑运算符
C语言双指针——经典题型
深度剖析C语言指针
Image, CV2 read the conversion and size resize change of numpy array of pictures
visdom可视化实现与检查介绍
延迟初始化和密封类
Visual implementation and inspection of visdom
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
What is CSRF (Cross Site Request Forgery)?
TDengine 社区问题双周精选 | 第三期