while(true): leaning()|

-Watcher-

园龄:2年11个月粉丝:0关注:0

CUDA环境搭建

1.安装CUDA

CUDA Toolkit 12.6 Update 3 Downloads | NVIDIA Developer

img

2.安装miniconda

Download Now | Anaconda

img

3.安装GPU版的 Pytorch

PyTorch

img

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

备选手动安装

迅雷下载

https://download.pytorch.org/whl/cu124/torch-2.5.1%2Bcu124-cp39-cp39-win_amd64.whl

https://download.pytorch.org/whl/cu124/torch-2.5.1%2Bcu124-cp39-cp39-win_amd64.whl

本地安装

pip install torch-2.5.1+cu124-cp39-cp39-win_amd64.whl

4.安装d2l 和Jupyter

pip install d2l jupyter

d2l安装问题

img

解决方案

更换3.9版本的python环境

指定目录下创建conda环境

conda create --prefix "D:\Project\miniconda3\envs\d2l" python=3.9

这个命令会在 D:\Project\miniconda3\envs 目录下创建一个名为 d2l 的新环境。请注意,你需要确保 D:\Project\miniconda3\envs 这个目录已经存在,否则 Conda 可能会报错。

创建环境后,你可以使用以下命令激活新环境:

conda activate "D:\Project\miniconda3\envs\d2l"

5.安装 torchvision

pip install torchvision

6. 测试

import torch
print(torch.__version__)
print(torch.cuda.is_available())
import d2l
print(d2l.__version__)

img

7.测试训练模型

img

网盘链接

我用夸克网盘分享了「D2l」,点击链接即可保存。打开「夸克APP」,无需下载在线播放视频,畅享原画5倍速,支持电视投屏。
链接:https://pan.quark.cn/s/c7c0ffd633ee

本文作者:-Watcher-

本文链接:https://www.cnblogs.com/womaspace/p/18634430

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   -Watcher-  阅读(47)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 404 not found Radical Face
404 not found - Radical Face
00:00 / 00:00
An audio error has occurred.

Welcome Home - Radical Face

Written by:Ben P. Cooper

Sleep don't visit so I choke on sun

And the days blur into one

And the backs of my eyes hum with things

I've never done

Sheets are swaying from an old clothesline

Like a row of captured ghosts over old dead grass

Was never much but we made the most

Welcome home

Ships are launching from my chest

Some have names but most do not

You find If one

Please let me know what piece I've lost

Heal the scars from off my back

I don't need them anymore

You can throw them out or

Keep them in your mason jars

I've come home

All my nightmares escaped my head

Bar the door please don't let them in

You were never supposed to leave

Now my head's splitting at the seams

And I don't know if I can

Here beneath my lungs

I feel your thumbs press into my skin again