当前位置:网站首页>[step on pit collection] attempting to deserialize object on CUDA device+buff/cache occupy too much +pad_ sequence
[step on pit collection] attempting to deserialize object on CUDA device+buff/cache occupy too much +pad_ sequence
2022-07-06 22:41:00 【Director of anti scientific research PUA Institute】
Attempting to deserialize object on CUDA device
RuntimeError: Attempting to deserialize object on CUDA device 2 but torch.cuda.device_count() is 1
solve :
device = "cuda:0"
model.load_state_dict(torch.load('tut1-model.pt', map_location=device))
model.cuda(device=device)
buff/cache Occupy too much
linux On buff/cache Too much occupation leads to jamming
solve ( With root execute ):
echo 3 > /proc/sys/vm/drop_caches
pad_sequence Use
solve :
from torch.nn.utils.rnn import pad_sequence
def my_collate(batch):
a = torch.ones(25, 300)
b = torch.ones(22, 300)
c = torch.ones(15, 300)
pad_sequence([a, b, c]).size()
边栏推荐
- memcached
- Improving Multimodal Accuracy Through Modality Pre-training and Attention
- Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
- hdu 5077 NAND(暴力打表)
- Rust knowledge mind map XMIND
- Extern keyword
- MATLAB小技巧(27)灰色预测
- MySQL约束的分类、作用及用法
- 视图(view)
- Dealing with the crash of QT quick project in offscreen mode
猜你喜欢

uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)

Clip +json parsing converts the sound in the video into text

自定义 swap 函数

2022-07-04 mysql的高性能数据库引擎stonedb在centos7.9编译及运行

Improving Multimodal Accuracy Through Modality Pre-training and Attention

CocosCreator+TypeScripts自己写一个对象池

Daily question 1: force deduction: 225: realize stack with queue

Should novice programmers memorize code?

自制J-Flash烧录工具——Qt调用jlinkARM.dll方式
![pytorch_ Yolox pruning [with code]](/img/98/31d6258635ce48ac53819d0ca12d1d.jpg)
pytorch_ Yolox pruning [with code]
随机推荐
uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)
Advantages of link local address in IPv6
sizeof关键字
Mysql 身份认证绕过漏洞(CVE-2012-2122)
Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem
Should novice programmers memorize code?
return 关键字
如何实现文字动画效果
GD32F4XX串口接收中断和闲时中断配置
视图(view)
2022-07-04 mysql的高性能数据库引擎stonedb在centos7.9编译及运行
机试刷题1
手写ABA遇到的坑
变量与“零值”的比较
poj 1094 Sorting It All Out (拓扑排序)
Web APIs DOM time object
config:invalid signature 解决办法和问题排查详解
MySQL约束的分类、作用及用法
Aardio - integrate variable values into a string of text through variable names
将MySQL的表数据纯净方式导出