当前位置:网站首页>[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()
边栏推荐
猜你喜欢
Aardio - 通过变量名将变量值整合到一串文本中
Config:invalid signature solution and troubleshooting details
Heavyweight news | softing fg-200 has obtained China 3C explosion-proof certification to provide safety assurance for customers' on-site testing
Rust knowledge mind map XMIND
基於 QEMUv8 搭建 OP-TEE 開發環境
ACL 2022 | 序列标注的小样本NER:融合标签语义的双塔BERT模型
Daily question 1: force deduction: 225: realize stack with queue
Mysql 身份认证绕过漏洞(CVE-2012-2122)
Leetcode exercise - Sword finger offer 26 Substructure of tree
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
随机推荐
做国外LEAD2022年下半年几点建议
Web APIs DOM 时间对象
QT信号和槽
Unity3d minigame unity webgl transform plug-in converts wechat games to use dlopen, you need to use embedded 's problem
TypeScript获取函数参数类型
cuda 探索
2022-07-05 使用tpcc对stonedb进行子查询测试
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
poj 1094 Sorting It All Out (拓扑排序)
CocosCreator+TypeScripts自己写一个对象池
case 关键字后面的值有什么要求吗?
【编译原理】做了一半的LR(0)分析器
DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
Aardio - does not declare the method of directly passing float values
memcached
What are the specific steps and schedule of IELTS speaking?
return 关键字
three. JS gorgeous bubble effect
How do I write Flask's excellent debug log message to a file in production?
memcached