机器学习/pytorch:修订间差异
来自康健生活
| (未显示同一用户的6个中间版本) | |||
| 第13行: | 第13行: | ||
Kernel driver in use: nouveau | Kernel driver in use: nouveau | ||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||
检查可安装驱动。 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | {{Shc_out|<syntaxhighlight lang="bash"> | ||
ubuntu-drivers devices</syntaxhighlight>|<syntaxhighlight lang="bash">== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == | ubuntu-drivers devices</syntaxhighlight>|<syntaxhighlight lang="bash">== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == | ||
| 第25行: | 第25行: | ||
driver : xserver-xorg-video-nouveau - distro free builtin | driver : xserver-xorg-video-nouveau - distro free builtin | ||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||
在 [https://developer.nvidia.com/cuda-gpus nvidia-cuda-gpus] 查找显卡支持的版本。 | |||
在 [https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html cuda-toolkit-release] 查看 CUDA 要求的linux下的Driver Version。 | |||
安装驱动。 | |||
{{shc|<syntaxhighlight lang="bash"> | |||
sudo apt-get install nvidia-driver-470</syntaxhighlight>|$|/home/kangkk}} | |||
切换显卡。 | |||
{{shc|<syntaxhighlight lang="bash"> | |||
nvidia-settings | |||
</syntaxhighlight>|$|/home/kangkk}} | |||
选择PRIME Profiles标签。 | |||
查看是否切换N卡成功。 | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
sudo nvidia-smi</syntaxhighlight>|<syntaxhighlight lang="bash">Fri Nov 5 13:55:58 2021 | |||
+-----------------------------------------------------------------------------+ | |||
| NVIDIA-SMI 470.74 Driver Version: 470.74 CUDA Version: 11.4 | | |||
|-------------------------------+----------------------+----------------------+ | |||
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | |||
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | |||
| | | MIG M. | | |||
|===============================+======================+======================| | |||
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A | | |||
| N/A 39C P5 12W / N/A | 316MiB / 5934MiB | 30% Default | | |||
| | | N/A | | |||
+-------------------------------+----------------------+----------------------+ | |||
+-----------------------------------------------------------------------------+ | |||
| Processes: | | |||
| GPU GI CI PID Type Process name GPU Memory | | |||
| ID ID Usage | | |||
|=============================================================================| | |||
| 0 N/A N/A 1131 G /usr/lib/xorg/Xorg 45MiB | | |||
| 0 N/A N/A 1876 G /usr/lib/xorg/Xorg 115MiB | | |||
| 0 N/A N/A 2052 G /usr/bin/gnome-shell 23MiB | | |||
| 0 N/A N/A 2551 G ...AAAAAAAAA= --shared-files 120MiB | | |||
+-----------------------------------------------------------------------------+ | |||
</syntaxhighlight>|$|/home/kangkk}} | |||
== 安装 == | |||
[[Python/torch|torch]] | |||
== 参考 == | |||
* [https://github.com/rwightman/pytorch-image-models pytorch-image-models] | |||
* [https://github.com/chenyuntc/pytorch-book pytorch-book] | |||
* [https://github.com/zergtant/pytorch-handbook pytorch-handbook] | |||
* [https://github.com/yunjey/pytorch-tutorial pytorch-tutorial] | |||