René's URL Explorer Experiment


Title: 深度学习GPU环境配置及建模(Python) · Issue #66 · aialgorithm/Blog · GitHub

Open Graph Title: 深度学习GPU环境配置及建模(Python) · Issue #66 · aialgorithm/Blog

X Title: 深度学习GPU环境配置及建模(Python) · Issue #66 · aialgorithm/Blog

Description: 对于深度学习开发者,操作系统的选择、到深度学习相关依赖包安装、环境配置上,这些步骤看似简单基础,但其实也经常是有不少麻烦的。本文简要梳理了,从环境配置到深度学习建模的完整的流程,有所帮助的话,可以文末点个赞。 一、操作系统的选择 1.1 Linux 如果是深度学习的重度用户,首选的操作系统是Linux,虽然操作门槛搞一些(如命令行操作),但linux的开发环境很友好,可以减少很多依赖包不兼容的问题,可以大大提高效率。linux的发行版很多,比较常用的的可以安装个包含图形...

Open Graph Description: 对于深度学习开发者,操作系统的选择、到深度学习相关依赖包安装、环境配置上,这些步骤看似简单基础,但其实也经常是有不少麻烦的。本文简要梳理了,从环境配置到深度学习建模的完整的流程,有所帮助的话,可以文末点个赞。 一、操作系统的选择 1.1 Linux 如果是深度学习的重度用户,首选的操作系统是Linux,虽然操作门槛搞一些(如命令行操作),但linux的开发环境很友好,可以减少很多依赖包不兼容...

X Description: 对于深度学习开发者,操作系统的选择、到深度学习相关依赖包安装、环境配置上,这些步骤看似简单基础,但其实也经常是有不少麻烦的。本文简要梳理了,从环境配置到深度学习建模的完整的流程,有所帮助的话,可以文末点个赞。 一、操作系统的选择 1.1 Linux 如果是深度学习的重度用户,首选的操作系统是Linux,虽然操作门槛搞一些(如命令行操作),但linux的开发环境很友好,可以减少很多依赖包不兼容...

Opengraph URL: https://github.com/aialgorithm/Blog/issues/66

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"深度学习GPU环境配置及建模(Python)","articleBody":"对于深度学习开发者,操作系统的选择、到深度学习相关依赖包安装、环境配置上,这些步骤看似简单基础,但其实也经常是有不少麻烦的。本文简要梳理了,从环境配置到深度学习建模的完整的流程,有所帮助的话,可以文末点个赞。\r\n\r\n## 一、操作系统的选择\r\n\r\n### 1.1 Linux\r\n\r\n 如果是深度学习的重度用户,首选的操作系统是Linux,虽然操作门槛搞一些(如命令行操作),但linux的开发环境很友好,可以减少很多依赖包不兼容的问题,可以大大提高效率。linux的发行版很多,比较常用的的可以安装个包含图形界面及命令行的Ubuntu。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-bfe43e2662267d1a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n### 1.2、 Windows\r\n\r\n 如果要兼顾生活及开发,就笔记本上面看看视频、写写博客、跑跑代码(像我平时就是ctrl c ,再跑跑代码的),windows就够了,操作简单而且上面的各种依赖包也很齐全。(下文主要以Windows系统为例展开介绍,其他系统也是大同小异,有不清楚地方可以找相应教程)。\r\n\r\n### 1.3、 双系统的方案\r\n\r\n如果即想要linux做开发、windows兼顾生活,可以借助安装双系统或者虚拟机,那么有几种选择:\r\n\r\n1、 安装双系统\r\n\r\n硬件资源够的话,安装双个系统是比较直接的,能够比较纯粹地使用windows或者Linux,但是最麻烦的点在于切换间比较麻烦,需要开关机地切换。\r\n\r\n2、 虚拟机\r\n\r\n通过在虚拟机(如vmware)上面再安装另一个操作系统,这样打开虚拟机就可以很方便使用另一个系统了,但是缺点是虚拟机的硬件资源消耗也很高,而且有性能问题及各种bug。按我之前的尝试,这里更推荐linux作为主系统+虚拟机的windows,能更好发挥出Linux开发的效能。\r\n\r\n![](https://upload-images.jianshu.io/upload_images/11682271-f2bf92f42083cdf3.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n\r\n3、 WSL\r\n\r\n适用于 Linux 的 Windows 子系统 (WSL)是微软官方发布的应用,通俗来说它也就是Windows上面启用的Linux子系统。wsl安装非常简单,运行WSL的开销比运行一个虚拟机低很多,在wsl上面还可以配置cuda调用其GPU资源(但貌似配置复杂),用于日常学习是完全够用了。缺点是不如原linux来的纯粹,用于高强度开发的话,性能会弱些,还容易卡各种bug。\r\n\r\nwsl安装简单,在windows功能上打勾启用wsl功能后,\r\n![](https://upload-images.jianshu.io/upload_images/11682271-fe9bb9ef570013a5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\nWIN+R运行cmd,一句命令行`wsl --install`就可以安装好ubuntu系统了,安装好后 wsl就可以使用Linux系统了(命令行cli版),\r\n![](https://upload-images.jianshu.io/upload_images/11682271-28fe042374020059.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n两个系统之间数据可以自由访问,如访问D盘数据只要 `cd /mnt/d`,双系统使用上是非常方便的。\r\n\r\n可以参考WSL官方文档:https://learn.microsoft.com/zh-cn/windows/wsl/install\r\n\r\n\r\n\r\n## 二、Python环境配置\r\n搞定操作系统(比如Windows),接下来配置个Python环境。实现PYthon环境配置及依赖包管理最方便的就是安装个 anaconda,官网下载https://www.anaconda.com/download,\r\n\r\n如果网速慢,也可以到清华镜像上面快速下载一个https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/\r\n\r\n安装也很简单,一路确认就安装好了。这里可以勾选Add path 就可以配置好环境变量,也可以再勾选anaconda作为默认Python版本,后面比较省心。\r\n\r\n![](https://upload-images.jianshu.io/upload_images/11682271-8cadbf64a9da4242.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n通过点击jupyter notebook就可以进入python开发环境了,\r\n![](https://upload-images.jianshu.io/upload_images/11682271-8baf1381e291ef36.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n![](https://upload-images.jianshu.io/upload_images/11682271-d5d9d87e2da5a754.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n如果平时以小项目、数据分析、调调模型为主,jupyter notebook作为开发工具是够的。如果平时任务以大型项目居多,还可以再安装个IDE编辑器如vscode、pycharm。\r\n\r\n## 三、安装相关的库\r\n这里有两种方案,如果只有CPU资源直接选择【3.1 CPU环境配置】就可以很快开始深度学习建模。如有GPU资源,可以选择【3.2 GPU环境配置】开始繁琐的安装配置及建模。\r\n\r\n### 3.1 CPU环境配置\r\n安装相关的python依赖包,主要的如数据处理库pandas、机器学习库scikit-learn、深度学习库tensorflow、pytorch等等。简单安装几个必要的包,后面运行项目代码,有发现缺什么包再补什么。\r\n\r\n可以点击prompt打开命令行安装,\r\n![](https://upload-images.jianshu.io/upload_images/11682271-0e6a4a10b7f3e4dd.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\npython安装依赖也很简单,比如`pip install tensorflow` 就可以安装好tensorflow神经网络库。\r\n\r\n安装好相关的依赖包后,基本上就可以开始在CPU运算环境的深度学习、机器学习的代码开发了。\r\n\r\n### 3.2 GPU环境配置\r\n在大数据量、大模型炼丹的场景下,深度学习会耗费大量的算力及时间,这时可以用GPU来加速神经网络模型训练(唠叨一句,购置gpu首选大显存的!)。\r\n\r\n如果硬件配置有nvdia的GPU的话(使用 AMD 的 GPU 也可行但很麻烦,相关信息可参阅:https://rocmdocs.amd.com/en/latest/),接下来就可以开始GPU开发环境cuda的配置,这个流程稍微繁琐容易出错,请耐心配置。\r\n\r\n\r\n- 安装cuda\r\n\r\n通过桌面鼠标右键进入nvdia的控制面板,看到显卡类型,可以看到我的游戏本有配了个独立显卡950M(算力仅仅为5,虽然这是GPU中的渣渣..但也比纯cpu香啊!),\r\n![](https://upload-images.jianshu.io/upload_images/11682271-92e55c36b41fa4ef.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n![](https://upload-images.jianshu.io/upload_images/11682271-33c5281c26fdf982.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n依据显卡算力我们可以知道对应支持的cuda版本号范围,像算力为5对应的cuda版本号就可以选择cuda-10.1\r\n![](https://upload-images.jianshu.io/upload_images/11682271-5d227d35ebc65eef.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n(好像也可以在nvdia控制面板的系统信息看到相关cuda的版本号)\r\n![](https://upload-images.jianshu.io/upload_images/11682271-054af1cd1e9bf6b5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n相应的,我们到官网下载相应版本的cuda,https://developer.nvidia.com/cuda-toolkit-archive\r\n![](https://upload-images.jianshu.io/upload_images/11682271-8667f14d60ed020e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n然后,运行cuda安装包,我直接精简安装,一路确认就安装好了。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-3e124da822456a2b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n\r\n\r\n\r\nwin+R 输入cmd,进入命令行界面:\r\n\r\n输入以下指令:`nvcc  -V` 能够正常显示版本号,cuda就安装好了\r\n```\r\n# $ nvcc -V\r\n# nvcc: NVIDIA (R) Cuda compiler driver\r\n# Copyright (c) 2005-2019 NVIDIA Corporation\r\n# Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019\r\n# Cuda compilation tools, release 10.1, V10.1.105\r\n\r\n```\r\n- 安装cudnn\r\ncuda安装完了还需要下载个cudnn(即 CUDA Deep Neural Network 软件库),这是一个 GPU 加速的深度神经网络基元库。不同版本的cuda 对应着不同的cudnn版本(我这边cuda10.1对应cudnn7.5的),详情可以从英伟达官网找到具体信息https://developer.nvidia.com/rdp/cudnn-archive ,下载cudnn还需要去英伟达官网注册。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-f124b8e90d92f91b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\ncudnn解压以后将各个子文件夹\r\n![](https://upload-images.jianshu.io/upload_images/11682271-b702294f3653f93c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n拷贝到cuda安装目录下,到此,cuda整个环境就配置好了。\r\n![](https://upload-images.jianshu.io/upload_images/11682271-c852790a6b5ca119.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n\r\n- Pytorch\r\n\r\n最后,安装Python相关的(支持GPU)的深度学习库,本文建模用的是pytorch(tensorflow、keras等其他库也是可以的)\r\n\r\n可以到官网下载相应的pytorch版本,https://pytorch.org/get-started/locally/\r\n\r\n官网会很友好地给出相应的所选的cuda版本对应的安装命令,\r\n![](https://upload-images.jianshu.io/upload_images/11682271-f716767569f7911d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n比如我这边cuda10.1对应的命令如下,在anaconda命令行输入就可以安装相关依赖包。\r\n\r\n`conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch` \r\n\r\n\r\n安装以后,可以检查GPU的可用性 ,通过调用torch.cuda.is_available()。如果结果为 True,则表明系统已正确安装Nvidia驱动。进入jupyter notebook运行:\r\n`import torch torch.cuda.is_available()`\r\n\r\n![](https://upload-images.jianshu.io/upload_images/11682271-4d3f22e9fda75016.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n\r\n## 四、 深度学习模型训练\r\n\r\n本节的示例是调用GPU或CPU版的pytorch搭建深度学习图像分类模型(CNN),并对比下性能差异。详细的深度学习建模过程可以参考之前文章 [《一文搞定深度学习建模》](http://mp.weixin.qq.com/s?__biz=MzI4MDE1NjExMQ==\u0026mid=2247486048\u0026idx=1\u0026sn=bbbe904159a9f9a65940057992a2ce8b\u0026scene=19#wechat_redirect)\r\n ![](https://upload-images.jianshu.io/upload_images/11682271-63c842d64ba11a73.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n```\r\n%%time\r\nimport torch,torchvision\r\nimport torch.nn as nn\r\nimport torchvision.transforms as transforms\r\n ## 项目源码可以到https://github.com/aialgorithm/Blog\r\n#定义CNN神经网络模型\r\nclass CNNCifar(nn.Module):\r\n    def __init__(self):\r\n        super(CNNCifar,self).__init__()\r\n        self.feature = nn.Sequential(\r\n            nn.Conv2d(3,64,3,padding=2),   nn.BatchNorm2d(64),  nn.ReLU(), nn.MaxPool2d(2,2),\r\n            nn.Conv2d(64,128,3,padding=2), nn.BatchNorm2d(128), nn.ReLU(), nn.MaxPool2d(2,2),\r\n            nn.Conv2d(128,256,3,padding=1),nn.BatchNorm2d(256), nn.ReLU(), nn.MaxPool2d(2,2),\r\n            nn.Conv2d(256,512,3,padding=1),nn.BatchNorm2d(512), nn.ReLU(), nn.MaxPool2d(2,2)\r\n        )\r\n        self.classifier=nn.Sequential(\r\n            nn.Flatten(),\r\n            nn.Linear(2048, 4096),nn.ReLU(),nn.Dropout(0.5),\r\n            nn.Linear(4096,4096), nn.ReLU(),nn.Dropout(0.5),\r\n            nn.Linear(4096,100)\r\n        )\r\n        \r\n    def forward(self, x):\r\n \r\n        x = self.feature(x)\r\n        output = self.classifier(x)\r\n        return output\r\n        \r\nnet = CNNCifar()\r\nprint(net)\r\n \r\n#加载数据集\r\napply_transform = transforms.Compose([\r\n        transforms.ToTensor(),\r\n        transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)),\r\n    ])\r\n \r\ntrain_dataset = torchvision.datasets.CIFAR10(root='../data/cifar100', train=True, download=True,transform=apply_transform)\r\ntest_dataset = torchvision.datasets.CIFAR10(root='../data/cifar100', train=False, download=True,transform=apply_transform)\r\n \r\ntrain_loader = torch.utils.data.DataLoader(train_dataset, batch_size=64, num_workers=2,\r\n                          pin_memory=True,shuffle=True)\r\ntest_loader = torch.utils.data.DataLoader(test_dataset, batch_size=64, num_workers=2,\r\n                          pin_memory=True,shuffle=False)\r\n \r\n#定义损失函数和优化器\r\ncriterion = torch.nn.CrossEntropyLoss()\r\noptimizer = torch.optim.Adam(net.parameters(), lr=0.001,weight_decay=5e-4)\r\n \r\n#获取设备:如果有gpu就使用gpu,否则使用cpu\r\ndevice = torch.device('cuda'if torch.cuda.is_available() else 'cpu')\r\nnet = net.to(device) # 简单通过.to(device), 数据或模型就可以转移至GPU\r\n \r\n#训练模型\r\nprint('training on: ',device)\r\ndef test(): \r\n    net.eval()\r\n    acc = 0.0\r\n    sum = 0.0\r\n    loss_sum = 0\r\n    for batch, (data, target) in enumerate(test_loader):\r\n        data, target = data.to(device), target.to(device)\r\n        output = net(data)\r\n        loss = criterion(output, target)\r\n        acc+=torch.sum(torch.argmax(output,dim=1)==target).item()\r\n        sum+=len(target)\r\n        loss_sum+=loss.item()\r\n    print('test  acc: %.2f%%, loss: %.4f'%(100*acc/sum, loss_sum/(batch+1)))\r\n\r\ndef train(): \r\n    net.train()\r\n    acc = 0.0\r\n    sum = 0.0\r\n    loss_sum = 0\r\n    for batch, (data, target) in enumerate(train_loader):\r\n        data, target = data.to(device), target.to(device)\r\n        optimizer.zero_grad()\r\n        output = net(data)\r\n        loss = criterion(output, target)\r\n        loss.backward()\r\n        optimizer.step()\r\n\r\n        acc +=torch.sum(torch.argmax(output,dim=1)==target).item()\r\n        sum+=len(target)\r\n        loss_sum+=loss.item()\r\n\r\n        if batch%200==0:\r\n            print('\\tbatch: %d, loss: %.4f'%(batch, loss.item()))\r\n    print('train acc: %.2f%%, loss: %.4f'%(100*acc/sum, loss_sum/(batch+1)))\r\n\r\n    \r\n## 开始训练模型\r\nfor epoch in range(5):\r\n    print('epoch: %d'%epoch)\r\n    train()\r\n    test()\r\n```\r\n可以通过`device = torch.device('cuda'if torch.cuda.is_available() else 'cpu')`分别修改相应的运算设备gpu或者cpu, 对比使用cpu、gpu资源占用的变化:\r\n![](https://upload-images.jianshu.io/upload_images/11682271-b78d324c66c5604e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n![](https://upload-images.jianshu.io/upload_images/11682271-fabd92dddb2e4d9c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\r\n同一超参数下模型预测效果上面来看两者差不多,但运行时间CPU是GPU的5倍左右,GPU对深度学习训练的效率提升还是很明显的!\r\n```\r\n###################\r\ntraining on:  cpu\r\nepoch: 0\r\n\tbatch: 0, loss: 4.5887\r\n\tbatch: 200, loss: 1.5186\r\n\tbatch: 400, loss: 1.3614\r\n\tbatch: 600, loss: 1.2306\r\ntrain acc: 42.96%, loss: 1.5834\r\ntest  acc: 54.61%, loss: 1.2249\r\nWall time: 18min 27s\r\n###################\r\ntraining on:  cuda\r\nepoch: 0\r\n\tbatch: 0, loss: 4.6759\r\n\tbatch: 200, loss: 1.5816\r\n\tbatch: 400, loss: 1.6414\r\n\tbatch: 600, loss: 1.2504\r\ntrain acc: 43.72%, loss: 1.5647\r\ntest  acc: 53.02%, loss: 1.2784\r\nWall time: 3min 22s\r\n\r\n```\r\n\r\n---\r\n","author":{"url":"https://github.com/aialgorithm","@type":"Person","name":"aialgorithm"},"datePublished":"2023-05-05T14:22:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/66/Blog/issues/66"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:21f40294-258f-2835-09c9-58f77b80d237
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8632:E8423:147A110:1B5B11D:696ADC02
html-safe-nonceb9b0eb79c108bc38a1d02db97132b17510180b8fc180690abab553eb80fc0972
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjMyOkU4NDIzOjE0N0ExMTA6MUI1QjExRDo2OTZBREMwMiIsInZpc2l0b3JfaWQiOiIxOTIwNzc5MDk5Nzc2NTIyMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb76f30e2ac5b94d2af4d4fbecf24e17ac972762c16625a0952f0ead4522e49d2
hovercard-subject-tagissue:1697709929
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aialgorithm/Blog/66/issue_layout
twitter:imagehttps://opengraph.githubassets.com/12c8ba2c81d6f4443e87455b1781fc8b8c787cf4fce952ad74c4cc677e2501e4/aialgorithm/Blog/issues/66
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/12c8ba2c81d6f4443e87455b1781fc8b8c787cf4fce952ad74c4cc677e2501e4/aialgorithm/Blog/issues/66
og:image:alt对于深度学习开发者,操作系统的选择、到深度学习相关依赖包安装、环境配置上,这些步骤看似简单基础,但其实也经常是有不少麻烦的。本文简要梳理了,从环境配置到深度学习建模的完整的流程,有所帮助的话,可以文末点个赞。 一、操作系统的选择 1.1 Linux 如果是深度学习的重度用户,首选的操作系统是Linux,虽然操作门槛搞一些(如命令行操作),但linux的开发环境很友好,可以减少很多依赖包不兼容...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaialgorithm
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
go-importgithub.com/aialgorithm/Blog git https://github.com/aialgorithm/Blog.git
octolytics-dimension-user_id33707637
octolytics-dimension-user_loginaialgorithm
octolytics-dimension-repository_id147093233
octolytics-dimension-repository_nwoaialgorithm/Blog
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id147093233
octolytics-dimension-repository_network_root_nwoaialgorithm/Blog
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release524a93f2c1f36522a3b4be4c110467ee4172245d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/aialgorithm/Blog/issues/66#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faialgorithm%2FBlog%2Fissues%2F66
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Faialgorithm%2FBlog%2Fissues%2F66
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=aialgorithm%2FBlog
Reloadhttps://github.com/aialgorithm/Blog/issues/66
Reloadhttps://github.com/aialgorithm/Blog/issues/66
Reloadhttps://github.com/aialgorithm/Blog/issues/66
aialgorithm https://github.com/aialgorithm
Bloghttps://github.com/aialgorithm/Blog
Notifications https://github.com/login?return_to=%2Faialgorithm%2FBlog
Fork 259 https://github.com/login?return_to=%2Faialgorithm%2FBlog
Star 942 https://github.com/login?return_to=%2Faialgorithm%2FBlog
Code https://github.com/aialgorithm/Blog
Issues 66 https://github.com/aialgorithm/Blog/issues
Pull requests 0 https://github.com/aialgorithm/Blog/pulls
Actions https://github.com/aialgorithm/Blog/actions
Projects 0 https://github.com/aialgorithm/Blog/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/aialgorithm/Blog/security
Please reload this pagehttps://github.com/aialgorithm/Blog/issues/66
Insights https://github.com/aialgorithm/Blog/pulse
Code https://github.com/aialgorithm/Blog
Issues https://github.com/aialgorithm/Blog/issues
Pull requests https://github.com/aialgorithm/Blog/pulls
Actions https://github.com/aialgorithm/Blog/actions
Projects https://github.com/aialgorithm/Blog/projects
Security https://github.com/aialgorithm/Blog/security
Insights https://github.com/aialgorithm/Blog/pulse
New issuehttps://github.com/login?return_to=https://github.com/aialgorithm/Blog/issues/66
New issuehttps://github.com/login?return_to=https://github.com/aialgorithm/Blog/issues/66
深度学习GPU环境配置及建模(Python)https://github.com/aialgorithm/Blog/issues/66#top
https://github.com/aialgorithm
https://github.com/aialgorithm
aialgorithmhttps://github.com/aialgorithm
on May 5, 2023https://github.com/aialgorithm/Blog/issues/66#issue-1697709929
https://camo.githubusercontent.com/58a9ee0e0a6e140ee73a1d2b82f01391c9129d8a4c26e2f6670f57d98211bd30/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d626665343365323636323236376431612e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/faf33cf6a1c98256133bc29227644e46885d6bd612da3ba99bc05f308a4c4b65/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d663262663932663432303833636466332e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/31a622127fa027d718e00f02642c29025bab013d4fd07e01001ba79033a7e7b4/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d666539626239656635373030313361352e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/acfbde1da8d6cc96be3c54912c8576ff7fec5f79f939340098d2c9e5f38a64f7/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d323866653034323337343032303035392e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://learn.microsoft.com/zh-cn/windows/wsl/installhttps://learn.microsoft.com/zh-cn/windows/wsl/install
https://www.anaconda.com/download,https://www.anaconda.com/download%EF%BC%8C
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
https://camo.githubusercontent.com/15692f741da5aaff645e18e0dc0564d1aec064df666c07dd768e74329541ae67/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d386361646266363461396461343234322e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/44cb316c3abe61402905805c215b6aeb29bd4a2646bf7eb14cad959749f0a8f5/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d386261663133383165323931656633362e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/0d46cb4fc9aa7d1e413e0abbddc47424418541135b641e987a3b8946037968d0/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d643564396438376532646135613735342e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/303b3d326384ec28c0ff7b9b9873c7c3166966143f08fc2aafeb23382a78cedb/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d306536613461313062376633653464642e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://rocmdocs.amd.com/en/latest/),接下来就可以开始GPU开发环境cuda的配置,这个流程稍微繁琐容易出错,请耐心配置。https://rocmdocs.amd.com/en/latest/%EF%BC%89%EF%BC%8C%E6%8E%A5%E4%B8%8B%E6%9D%A5%E5%B0%B1%E5%8F%AF%E4%BB%A5%E5%BC%80%E5%A7%8BGPU%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83cuda%E7%9A%84%E9%85%8D%E7%BD%AE%EF%BC%8C%E8%BF%99%E4%B8%AA%E6%B5%81%E7%A8%8B%E7%A8%8D%E5%BE%AE%E7%B9%81%E7%90%90%E5%AE%B9%E6%98%93%E5%87%BA%E9%94%99%EF%BC%8C%E8%AF%B7%E8%80%90%E5%BF%83%E9%85%8D%E7%BD%AE%E3%80%82
https://camo.githubusercontent.com/bfa3bd59717bcb497014b95a7b9efc982d3b0376ba833eeaabdfcef82aa0a857/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d393265353563333662343166613465662e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/788ad4b4ff04df3957680110cf819f3d47fd7f2b142b146261c2ef0de9f74d7d/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d333363353238316332366664663938322e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/ce8d48d459f13338aab1a68d11368564c2a0d07c84257b2f75bfbcd8ddffe028/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d356432323764333565626336356565662e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/7a94bae4245059dfe652421b6aa095cf0338bbeb522633cdcbc433c77397c4e3/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d303534616631636431653962663662352e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://developer.nvidia.com/cuda-toolkit-archivehttps://developer.nvidia.com/cuda-toolkit-archive
https://camo.githubusercontent.com/ce5ed39dcfa68ca949934aab6f68af612c4e8d23f5aafeecc2cd1ca92405ab89/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d383636376631346436306564303230652e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/d9269a39e44f0d3ff8c6c858cd13a2a03fed8d9405d0dd331d036157bce0a041/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d336531323464613832323435366132622e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://developer.nvidia.com/rdp/cudnn-archivehttps://developer.nvidia.com/rdp/cudnn-archive
https://camo.githubusercontent.com/68e3606480efc39e0e7cac198308e4bfa0152e1476ea6501d1dd777263694b8c/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d663132346238653930643932663931622e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/7ec1570ddc1936496b2ab045cd8f7b6a62e0f0ef1085d44dde694456da6618c8/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d623730323239346633363533663933632e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/e3c4f864e2a5931efe5d89dd3a3dedf277f7c3eae63cb251a91637c10170f88a/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d633835323739306136623563613131392e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://pytorch.org/get-started/locally/https://pytorch.org/get-started/locally/
https://camo.githubusercontent.com/974acb88f453687ae57ada2c90df96660413b340d8b61f034d6366279da2927e/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d663731363736373536396637393131642e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/b587d82dd99589d49db8536712fe7a8bf4c9c14a38c80c284881e9821861aaab/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d346433663232653966646137353031362e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
《一文搞定深度学习建模》http://mp.weixin.qq.com/s?__biz=MzI4MDE1NjExMQ==&mid=2247486048&idx=1&sn=bbbe904159a9f9a65940057992a2ce8b&scene=19#wechat_redirect
https://camo.githubusercontent.com/a5651bf65e45899955747bbeee900b9a63421803b62f09547e8a8e55e476341a/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d363363383432643634626131316137332e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/0274ea0659436cb9305221c4f0cc1fd6a330d761bb8fe72dade8e78ec8d21879/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d623738643332346336366335363034652e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://camo.githubusercontent.com/8265175943ba469ead22c6810d7060341a89e34938257d3c5df82c96132a7568/68747470733a2f2f75706c6f61642d696d616765732e6a69616e7368752e696f2f75706c6f61645f696d616765732f31313638323237312d666162643932646464623265346439632e706e673f696d6167654d6f6772322f6175746f2d6f7269656e742f7374726970253743696d61676556696577322f322f772f31323430
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.