![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pytorch
郑郑yay
这个作者很懒,什么都没留下…
展开
-
RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment
解决方案:输入指令sudo shutdown -r now即可重新启动驱动。如果还是无法解决则需要重新安装驱动。原创 2022-09-04 15:50:17 · 1384 阅读 · 0 评论 -
pytorch学习(一)
# 构造一个5x3矩阵,不初始化x = torch.empty(5,3)print(x)# 构造一个随机初始化矩阵x = torch.rand(5,3)print(x)# 构造一个矩阵全为0,而且数据类型是longx = torch.zeros(5, 3, dtype=torch.long)print(x)# 构造一个张量,直接使用数据x = torch.sensor([5.5, 3])print(x)# 构造一个tensor,基于已经存在的tensorx = torch.rand原创 2021-02-02 21:08:15 · 225 阅读 · 0 评论