Skip to content

pytorch+cuda的安装 #99

@any86

Description

@any86

cuda在官方找对应版本

https://developer.nvidia.com/cuda-toolkit-archive

image

pytorch安装命令每次都会不同, 每次看官方吧.

https://pytorch.org/
image

安装过程中各种报错, 最好就是无脑清空下已有安装,然后在执行pytorch官网提供的命令, 由于网速问题可能需要多次安装才能成功.

conda clean -all 

最后代码中试下是否安装成功

import torch
use_gpu = torch.cuda.is_available()
print(use_gpu)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions