首先安装显卡驱动
链接:https://pan.baidu.com/s/10diYh9Xk3M4v15f8N5pIdg
提取码:yiko
要么两个都是-11.。要么两个都是-10.我是-11
首先运行EXE
然后选择自定义,然后一直下一步就可以了
然后把上面那个200兆的文件解压,然后复制到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6然后一定要重启电脑
3搭建运行环境
torch==1.12.1+cu116晚上可能下载速度慢,凌晨2点速度最快。
然后网页打开https://pytorch-geometric.com/whl/torch-1.12.1%2Bcu116.html
下载torch_scatter-2.1.0+pt112cu116-cp39-cp39-win_amd64.whl
Win+R启动cmd,出现dos 命令界面
首先是创建一个3.9版本的环境,然后激活该环境逐一安装一些库
conda create --name YM39 python=3.9
conda activate YM39
pip install "D:\BaiduNetdiskDownload\torch-1.12.1+cu116-cp39-cp39-win_amd64.whl"
pip install torch==1.12.1+cu116 -f https://download.pytorch.org/whl/cu116/torch_stable.html
pip install torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
pip install "D:\BaiduNetdiskDownload\torch_scatter-2.1.0+pt112cu116-cp39-cp39-win_amd64.whl"
pip install numpy==1.26 scipy scikit-learn munkres matplotlib tqdm pandas seaborn scikit-image
pip install opencv-contrib-python==4.4.0.46
pip install pyro-ppl==1.8.2
以下是我程序的部分运行结果:
++++++++++++++++++++++++++++++
---details of graph dataset---
++++++++++++++++++++++++++++++
dataset name: cora
feature shape: (2708, 1433)
label shape: (2708,)
adj shape: (2708, 2708)
undirected edge num: 5278
category num: 7
category distribution:
label 0:351
label 1:217
label 2:418
label 3:818
label 4:426
label 5:298
label 6:180