当前位置:网站首页>DGL安装教程
DGL安装教程
2022-08-04 21:05:00 【诸神缄默不语】
DGL官方安装教程网址:Deep Graph Library
以下仅考虑Linux系统的情况。(在Windows上跑GNN是不是太身残志坚了)
以下对应可行的安装时间会对应附上。
注意:这里对应的cuda版本,一般情况下只要跟cudatoolkit对应上就行。
1. 安装
2022.8.3
我安装PyTorch用的Python3.8,命令是conda install pytorch==1.11.0 torchvision==0.12.0 torchaudio==0.11.0 cudatoolkit=10.2 -c pytorch
可以直接在DGL官网选择对应的情况,复制命令行进行安装:
注意在能够正常使用之前还需要安装psutil包,否则就会报如下错误:
Traceback (most recent call last):
File "hello.py", line 1, in <module>
import dgl.data
File "my_env/envgraph1/lib/python3.8/site-packages/dgl/__init__.py", line 25, in <module>
from . import dataloading
File "my_env/lib/python3.8/site-packages/dgl/dataloading/__init__.py", line 10, in <module>
from .dataloader import *
File "my_env/lib/python3.8/site-packages/dgl/dataloading/dataloader.py", line 12, in <module>
import psutil
ModuleNotFoundError: No module named 'psutil'
安装psutil(psutil的官方下载教程网站:psutil/INSTALL.rst at master · giampaolo/psutil):pip install psutil
2. 检验安装效果
import dgl.data
dataset = dgl.data.CoraGraphDataset()
print('Number of categories:', dataset.num_classes)
输出:
my_env/lib/python3.8/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.1
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Downloading user_path/.dgl/cora_v2.zip from https://data.dgl.ai/dataset/cora_v2.zip...
Extracting file to user_path/.dgl/cora_v2
Finished data loading and preprocessing.
NumNodes: 2708
NumEdges: 10556
NumFeats: 1433
NumClasses: 7
NumTrainingSamples: 140
NumValidationSamples: 500
NumTestSamples: 1000
Done saving data into cached files.
Number of categories: 7
(这个SciPy和numpy的版本警告我也没辙)
边栏推荐
- Comic | Two weeks after the boss laid me off, he hired me back and doubled my salary!
- [2022 Hangzhou Electric Multi-School 5 1003 Slipper] Multiple Super Source Points + Shortest Path
- 1.读写点云文件
- matlab 画图
- LayaBox---TypeScript---Problems encountered at first contact
- PowerCLi batch configuration of NTP
- visual studio 2015 warning MSB3246
- 帝国CMS仿核弹头H5小游戏模板/92game帝国CMS内核仿游戏网整站源码
- 三种方式设置特定设备UWP XAML view
- [Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...
猜你喜欢
![[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[Academic related] Tsinghua professor persuaded to quit his Ph.D.:I have seen too many doctoral students have mental breakdowns, mental imbalances, physical collapses, and nothing!...

无代码平台字段设置:基础设置入门教程

帝国CMS仿核弹头H5小游戏模板/92game帝国CMS内核仿游戏网整站源码

文章复现:超分辨率网络-VDSR

Retrofit的使用及原理详解

DSPE-PEG-Aldehyde, DSPE-PEG-CHO, Phospholipid-Polyethylene Glycol-Aldehyde A hydrophobic 18-carbon phospholipid

Spss-一元回归实操

Oreo domain name authorization verification system v1.0.6 public open source version website source code

Zynq Fpga图像处理之AXI接口应用——axi_lite接口使用

proe和creo的区别有哪些
随机推荐
Zynq Fpga图像处理之AXI接口应用——axi_lite接口使用
Data warehouse (1) What is data warehouse and what are the characteristics of data warehouse
【debug】postgres数据存储错乱
【编程思想】
拼多多开放平台订单信息查询接口【pdd.order.basic.list.get订单基础信息列表查询接口(根据成交时间)】代码对接教程
Debug locally and start the local server in vs code
LayaBox---知识点
顺序队列
数电快速入门(三)(卡诺图化简法的介绍)
【2022杭电多校5 1003 Slipper】多个超级源点+最短路
【一起学Rust | 进阶篇 | Service Manager库】Rust专用跨平台服务管理库
项目难管理?先学会用好甘特图(内附操作方法及实用模板)
Named routes, the role of name in components
SPSS-System Clustering Hand Calculation Practice
动态规划_双数组字符串
括号匹配
stm32mp157系统移植 | 移植ST官方5.10内核到小熊派开发板
【2022杭电多校5 1012题 Buy Figurines】STL的运用
2022-8-4 第七组 ptz 锁与线程池和工具类
后缀式的计算