magicbook16, 5600H的CPU
使用miniforge安裝的python亚脆。
安裝CPU版本的pytorch:
conda create -n torch
conda activate torch
conda install pytorch torchvision torchaudio cpuonly -c pytorch
使用GPU的話做院,需要安裝directml
pip install torch-directml
測試程序:
import torch
import torch_directml
dml = torch_directml.device()
tensor1 = torch.tensor([1]).to(dml) # Note that dml is a variable, not a string!
tensor2 = torch.tensor([2]).to(dml)
dml_algebra = tensor1 + tensor2
dml_algebra.item()
好像還是CPU快一些,集成顯卡不行型酥。