一本全面讲解图深度学的专著,中英版皆有,官方网站:https://cse.msu.edu/~mayao4/dlg_book/

图深度学习Deep Learning on Graphs - 图1

英文预印版链接:http://cse.msu.edu/~mayao4/dlg_book/dlg_book.pdf

图深度学习Deep Learning on Graphs - 图2

附注:关于图神经网络的开源工具

开源特征选择库:scikit-feature: Feature Selection @ ASU

Python 语言图数据分析和可视化库:networkX、graph-tool 和 SNAP

ArthurWilson:1 NetworkX 概述

小帅:Python——利用 graphtool 进行图的可视化处理

关于图神经网络开源框架,例如,基于 PyTorch 开发的 PyG(PyTorch Geometry)[1], 同时支持 Tensorflow 和 PyTorch 的 DGL(Deep Graph Library)[2]

更详细的比较可阅读Houye:「紫禁之巅」四大图神经网络框架

第一次尝试安装 PyG

PyG 的 Github 地址:rusty1s/pytorch_geometric

图深度学习Deep Learning on Graphs - 图3

由于有我使用的 PyTorch1.7.0 版本,因此安装 PyG 有需要安装相应的 PyG 版本,即 PyG1.7.0 版本。

安装指令如下:

  1. pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
  2. pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
  3. pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
  4. pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.7.0+${CUDA}.html
  5. pip install torch-geometric

需要将指令中的 ${CUDA} 替换为你的 CUDA 版本,我的是 CUDA10.1,

因此指令为:

pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.7.0+cu101.html
pip install torch-geometric

测试

图深度学习Deep Learning on Graphs - 图4

安装成功。

参考

  1. ^Fey M, Lenssen J E. Fast graph representation learning with PyTorch Geometric[C]. ICLR Workshop on Representation Learning on Graphs and Maniflods, 2019. https://github.com/rusty1s/pytorch_geometric
  2. ^Wang M, Yu L, Zheng D, et al. Deep graph library: Towards efficient and scalable deep learning on graphs[J]. arXiv preprint arXiv:1909.01315, 2019. https://www.dgl.ai/
    https://zhuanlan.zhihu.com/p/373677297