美文网首页
PyTorch 踩坑笔记

PyTorch 踩坑笔记

作者: jianshuqwerty | 来源:发表于2019-04-28 21:27 被阅读0次

V0.3.1

RuntimeError: save_for_backward can only save input or output tensors, but argument 0 doesn't satisfy this condition

解决方案:Tensor转为Variable

input[index] 0.3.1的替代方案

torch.masked_select()

指定GPU版本
https://www.cnblogs.com/darkknightzh/p/6836568.html
1、CUDA_VISIBLE_DEVICES=1
2、import os
os.environ["CUDA_VISIBLE_DEVICES"] = "2"

相关文章

网友评论

      本文标题:PyTorch 踩坑笔记

      本文链接:https://www.haomeiwen.com/subject/kbskgqtx.html