问题1 检查版本的时候报错
import torch
import torch.nn as nn
import torchvision
print(torch.__version__)
print(torch.version.cuda)
print(torch.backends.cudnn.version())
print(torch.cuda.get_device_name(0))
print(torch.cuda.is_availablel()) # only when cuda is avaialble
mac m1 是没有cuda的, torc.CUDA.IS_AVAILABLE() 这个是直接报错而不是返回false, 老实说我觉得这里不太合理
问题2 安装 dgl 失败,提示
PackagesNotFoundError: The following packages are not available from current channels:
- dgl
因为m1 平台目前就是无法安装的,可以用 pip命令安装
pip install dgl -f https://data.dgl.ai/wheels/repo.html