00105-Deep Graph Library (DGL) 学习笔记


前言

Deep Graph Library (DGL) 学习笔记.

Deep Graph Library (DGL) is a Python package built for easy implementation of graph neural network model family, on top of existing DL frameworks (currently supporting PyTorch, MXNet and TensorFlow). It offers a versatile control of message passing, speed optimization via auto-batching and highly tuned sparse matrix kernels, and multi-GPU/CPU training to scale to graphs of hundreds of millions of nodes and edges.

官网:https://www.dgl.ai/

文档地址:https://docs.dgl.ai/

Github 地址:https://github.com/dmlc/dgl

操作系统:Ubuntu 22.04.2 LTS

参考文档

  1. 【scipy.sparse包】Python稀疏矩阵详解
  2. scipy 稀疏矩阵详解
  3. Categorical data
  4. pandas.Series.cat
  5. pandas.Series.cat.codes
  6. DataFrame.groupby
  7. TORCH.BMM

Home

文档地址:https://docs.dgl.ai/index.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/01-Welcome%20to%20Deep%20Graph%20Library%20Tutorials%20and%20Documentation%20—%20DGL%201.1.2post1%20documentation.pdf

Install and Setup

文档地址:https://docs.dgl.ai/install/index.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/02-Install%20and%20Setup%20—%20DGL%201.1.2post1%20documentation.pdf

A Blitz Introduction to DGL

文档地址:https://docs.dgl.ai/tutorials/blitz/index.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/03-A%20Blitz%20Introduction%20to%20DGL%20—%20DGL%201.1.2post1%20documentation.pdf

Node Classification with DGL

文档地址:https://docs.dgl.ai/tutorials/blitz/1_introduction.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/04-Node%20Classification%20with%20DGL%20—%20DGL%201.1.2post1%20documentation.pdf

How Does DGL Represent A Graph?

文档地址:https://docs.dgl.ai/tutorials/blitz/2_dglgraph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/05-How%20Does%20DGL%20Represent%20A%20Graph_%20—%20DGL%201.1.2post1%20documentation.pdf

Write your own GNN module

文档地址:https://docs.dgl.ai/tutorials/blitz/3_message_passing.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/06-Write%20your%20own%20GNN%20module%20—%20DGL%201.1.2post1%20documentation.pdf

文档地址:https://docs.dgl.ai/tutorials/blitz/4_link_predict.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/07-Link%20Prediction%20using%20Graph%20Neural%20Networks%20—%20DGL%201.1.2post1%20documentation.pdf

Training a GNN for Graph Classification

文档地址:https://docs.dgl.ai/tutorials/blitz/5_graph_classification.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/08-Training%20a%20GNN%20for%20Graph%20Classification%20—%20DGL%201.1.2post1%20documentation.pdf

Make Your Own Dataset

文档地址:https://docs.dgl.ai/tutorials/blitz/6_load_data.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/09-Make%20Your%20Own%20Dataset%20—%20DGL%201.1.3%20documentation.pdf

User Guide

文档地址:https://docs.dgl.ai/guide/index.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/10-User%20Guide%20—%20DGL%201.1.3%20documentation.pdf

Chapter 1: Graph

文档地址:https://docs.dgl.ai/guide/graph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/11-Chapter%201_%20Graph%20—%20DGL%201.1.3%20documentation.pdf

1.1 Some Basic Definitions about Graphs (Graphs 101)

文档地址:https://docs.dgl.ai/guide/graph-basic.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/12-1.1%20Some%20Basic%20Definitions%20about%20Graphs%20(Graphs%20101)%20—%20DGL%201.1.3%20documentation.pdf

1.2 Graphs, Nodes, and Edges

文档地址:https://docs.dgl.ai/guide/graph-graphs-nodes-edges.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/13-1.2%20Graphs,%20Nodes,%20and%20Edges%20—%20DGL%201.1.3%20documentation.pdf

1.3 Node and Edge Features

文档地址:https://docs.dgl.ai/guide/graph-feature.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/14-1.3%20Node%20and%20Edge%20Features%20—%20DGL%201.1.3%20documentation.pdf

1.4 Creating Graphs from External Sources

文档地址:https://docs.dgl.ai/guide/graph-external.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/15-1.4%20Creating%20Graphs%20from%20External%20Sources%20—%20DGL%201.1.3%20documentation.pdf

1.5 Heterogeneous Graphs

文档地址:https://docs.dgl.ai/guide/graph-heterogeneous.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/16-1.5%20Heterogeneous%20Graphs%20—%20DGL%201.1.3%20documentation.pdf

1.6 Using DGLGraph on a GPU

文档地址:https://docs.dgl.ai/guide/graph-gpu.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/17-1.6%20Using%20DGLGraph%20on%20a%20GPU%20—%20DGL%201.1.3%20documentation.pdf

Chapter 2: Message Passing

文档地址:https://docs.dgl.ai/guide/message.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/18-Chapter%202_%20Message%20Passing%20—%20DGL%201.1.3%20documentation.pdf

2.1 Built-in Functions and Message Passing APIs

文档地址:https://docs.dgl.ai/guide/message-api.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/19-2.1%20Built-in%20Functions%20and%20Message%20Passing%20APIs%20—%20DGL%201.1.3%20documentation.pdf

2.2 Writing Efficient Message Passing Code

文档地址:https://docs.dgl.ai/guide/message-efficient.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/20-2.2%20Writing%20Efficient%20Message%20Passing%20Code%20—%20DGL%201.1.3%20documentation.pdf

2.3 Apply Message Passing On Part Of The Graph

文档地址:https://docs.dgl.ai/guide/message-part.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/21-2.3%20Apply%20Message%20Passing%20On%20Part%20Of%20The%20Graph%20—%20DGL%201.1.3%20documentation.pdf

2.5 Message Passing on Heterogeneous Graph

文档地址:https://docs.dgl.ai/guide/message-heterograph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/22-2.5%20Message%20Passing%20on%20Heterogeneous%20Graph%20—%20DGL%201.1.3%20documentation.pdf

Chapter 3: Building GNN Modules

文档地址:https://docs.dgl.ai/guide/nn.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/23-Chapter%203_%20Building%20GNN%20Modules%20—%20DGL%201.1.3%20documentation.pdf

3.1 DGL NN Module Construction Function

文档地址:https://docs.dgl.ai/guide/nn-construction.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/24-3.1%20DGL%20NN%20Module%20Construction%20Function%20—%20DGL%201.1.3%20documentation.pdf

3.2 DGL NN Module Forward Function

文档地址:https://docs.dgl.ai/guide/nn-forward.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/25-3.2%20DGL%20NN%20Module%20Forward%20Function%20—%20DGL%201.1.3%20documentation.pdf

3.3 Heterogeneous GraphConv Module

文档地址:https://docs.dgl.ai/guide/nn-heterograph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/26-3.3%20Heterogeneous%20GraphConv%20Module%20—%20DGL%201.1.3%20documentation.pdf

Chapter 4: Graph Data Pipeline

文档地址:https://docs.dgl.ai/guide/data.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/27-Chapter%204_%20Graph%20Data%20Pipeline%20—%20DGL%201.1.3%20documentation.pdf

4.1 DGLDataset class

文档地址:https://docs.dgl.ai/guide/data-dataset.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/28-4.1%20DGLDataset%20class%20—%20DGL%201.1.3%20documentation.pdf

4.2 Download raw data (optional)

文档地址:https://docs.dgl.ai/guide/data-download.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/29-4.2%20Download%20raw%20data%20(optional)%20—%20DGL%201.1.3%20documentation.pdf

4.3 Process data

文档地址:https://docs.dgl.ai/guide/data-process.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/30-4.3%20Process%20data%20—%20DGL%201.1.3%20documentation.pdf

4.4 Save and load data

文档地址:https://docs.dgl.ai/guide/data-savenload.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/31-4.4%20Save%20and%20load%20data%20—%20DGL%201.1.3%20documentation.pdf

4.5 Loading OGB datasets using ogb package

文档地址:https://docs.dgl.ai/guide/data-loadogb.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/32-4.5%20Loading%20OGB%20datasets%20using%20ogb%20package%20—%20DGL%201.1.3%20documentation.pdf

4.6 Loading data from CSV files

文档地址:https://docs.dgl.ai/guide/data-loadcsv.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/33-4.6%20Loading%20data%20from%20CSV%20files%20—%20DGL%201.1.3%20documentation.pdf

Chapter 5: Training Graph Neural Networks

文档地址:https://docs.dgl.ai/guide/training.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/34-Chapter%205_%20Training%20Graph%20Neural%20Networks%20—%20DGL%201.1.3%20documentation.pdf

5.1 Node Classification/Regression

文档地址:https://docs.dgl.ai/guide/training-node.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/35-5.1%20Node%20Classification_Regression%20—%20DGL%201.1.3%20documentation.pdf

5.2 Edge Classification/Regression

文档地址:https://docs.dgl.ai/guide/training-edge.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/36-5.2%20Edge%20Classification_Regression%20—%20DGL%201.1.3%20documentation.pdf

文档地址:https://docs.dgl.ai/guide/training-link.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/37-5.3%20Link%20Prediction%20—%20DGL%201.1.3%20documentation.pdf

5.4 Graph Classification

文档地址:https://docs.dgl.ai/guide/training-graph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/38-5.4%20Graph%20Classification%20—%20DGL%201.1.3%20documentation.pdf

5.5 Use of Edge Weights

文档地址:https://docs.dgl.ai/guide/training-eweight.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/39-5.5%20Use%20of%20Edge%20Weights%20—%20DGL%201.1.3%20documentation.pdf

Chapter 6: Stochastic Training on Large Graphs

文档地址:https://docs.dgl.ai/guide/minibatch.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/40-Chapter%206_%20Stochastic%20Training%20on%20Large%20Graphs%20—%20DGL%201.1.3%20documentation.pdf

6.1 Training GNN for Node Classification with Neighborhood Sampling

文档地址:https://docs.dgl.ai/guide/minibatch-node.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/41-6.1%20Training%20GNN%20for%20Node%20Classification%20with%20Neighborhood%20Sampling%20—%20DGL%201.1.3%20documentation.pdf

6.2 Training GNN for Edge Classification with Neighborhood Sampling

文档地址:https://docs.dgl.ai/guide/minibatch-edge.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/42-6.2%20Training%20GNN%20for%20Edge%20Classification%20with%20Neighborhood%20Sampling%20—%20DGL%201.1.3%20documentation.pdf

文档地址:https://docs.dgl.ai/guide/minibatch-link.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/43-6.3%20Training%20GNN%20for%20Link%20Prediction%20with%20Neighborhood%20Sampling%20—%20DGL%201.1.3%20documentation.pdf

6.4 Implementing Custom Graph Samplers

文档地址:https://docs.dgl.ai/guide/minibatch-custom-sampler.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/44-6.4%20Implementing%20Custom%20Graph%20Samplers%20—%20DGL%201.1.3%20documentation.pdf

6.5 Implementing Custom GNN Module for Mini-batch Training

文档地址:https://docs.dgl.ai/guide/minibatch-nn.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/45-6.5%20Implementing%20Custom%20GNN%20Module%20for%20Mini-batch%20Training%20—%20DGL%201.1.3%20documentation.pdf

6.6 Exact Offline Inference on Large Graphs

文档地址:https://docs.dgl.ai/guide/minibatch-inference.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/46-6.6%20Exact%20Offline%20Inference%20on%20Large%20Graphs%20—%20DGL%201.1.3%20documentation.pdf

6.7 Using GPU for Neighborhood Sampling

文档地址:https://docs.dgl.ai/guide/minibatch-gpu-sampling.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/47-6.7%20Using%20GPU%20for%20Neighborhood%20Sampling%20—%20DGL%201.1.3%20documentation.pdf

6.8 Feature Prefetching

文档地址:https://docs.dgl.ai/guide/minibatch-prefetching.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/48-6.8%20Feature%20Prefetching%20—%20DGL%201.1.3%20documentation.pdf

Chapter 7: Distributed Training

文档地址:https://docs.dgl.ai/guide/distributed.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/49-Chapter%207_%20Distributed%20Training%20—%20DGL%201.1.3%20documentation.pdf

7.1 Data Preprocessing

文档地址:https://docs.dgl.ai/guide/distributed-preprocessing.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/50-7.1%20Data%20Preprocessing%20—%20DGL%201.1.3%20documentation.pdf

7.2 Tools for launching distributed training/inference

文档地址:https://docs.dgl.ai/guide/distributed-tools.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/51-7.2%20Tools%20for%20launching%20distributed%20training_inference%20—%20DGL%201.1.3%20documentation.pdf

7.3 Programming APIs

文档地址:https://docs.dgl.ai/guide/distributed-apis.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/52-7.3%20Programming%20APIs%20—%20DGL%201.1.3%20documentation.pdf

7.4 Advanced Graph Partitioning

文档地址:https://docs.dgl.ai/guide/distributed-partition.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/53-7.4%20Advanced%20Graph%20Partitioning%20—%20DGL%201.1.3%20documentation.pdf

7.5 Heterogeneous Graph Under The Hood

文档地址:https://docs.dgl.ai/guide/distributed-hetero.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/54-7.5%20Heterogeneous%20Graph%20Under%20The%20Hood%20—%20DGL%201.1.3%20documentation.pdf

Chapter 8: Mixed Precision Training

文档地址:https://docs.dgl.ai/guide/mixed_precision.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/55-Chapter%208_%20Mixed%20Precision%20Training%20—%20DGL%201.1.3%20documentation.pdf

用户指南

文档地址:https://docs.dgl.ai/guide_cn/index.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/56-用户指南%20—%20DGL%201.1.3%20documentation.pdf

第1章:图

文档地址:https://docs.dgl.ai/guide_cn/graph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/57-第1章:图%20—%20DGL%201.1.3%20documentation.pdf

1.1 关于图的基本概念

文档地址:https://docs.dgl.ai/guide_cn/graph-basic.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/58-1.1%20关于图的基本概念%20—%20DGL%201.1.3%20documentation.pdf

1.2 图、节点和边

文档地址:https://docs.dgl.ai/guide_cn/graph-graphs-nodes-edges.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/59-1.2%20图、节点和边%20—%20DGL%201.1.3%20documentation.pdf

1.3 节点和边的特征

文档地址:https://docs.dgl.ai/guide_cn/graph-feature.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/60-1.3%20节点和边的特征%20—%20DGL%201.1.3%20documentation.pdf

1.4 从外部源创建图

文档地址:https://docs.dgl.ai/guide_cn/graph-external.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/61-1.4%20从外部源创建图%20—%20DGL%201.1.3%20documentation.pdf

1.5 异构图

文档地址:https://docs.dgl.ai/guide_cn/graph-heterogeneous.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/62-1.5%20异构图%20—%20DGL%201.1.3%20documentation.pdf

1.6 在GPU上使用DGLGraph

文档地址:https://docs.dgl.ai/guide_cn/graph-gpu.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/63-1.6%20在GPU上使用DGLGraph%20—%20DGL%201.1.3%20documentation.pdf

第2章:消息传递范式

文档地址:https://docs.dgl.ai/guide_cn/message.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/64-第2章:消息传递范式%20—%20DGL%201.1.3%20documentation.pdf

2.1 内置函数和消息传递API

文档地址:https://docs.dgl.ai/guide_cn/message-api.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/65-2.1%20内置函数和消息传递API%20—%20DGL%201.1.3%20documentation.pdf

2.2 编写高效的消息传递代码

文档地址:https://docs.dgl.ai/guide_cn/message-efficient.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/66-2.2%20编写高效的消息传递代码%20—%20DGL%201.1.3%20documentation.pdf

2.3 在图的一部分上进行消息传递

文档地址:https://docs.dgl.ai/guide_cn/message-part.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/67-2.3%20在图的一部分上进行消息传递%20—%20DGL%201.1.3%20documentation.pdf

2.5 在异构图上进行消息传递

文档地址:https://docs.dgl.ai/guide_cn/message-heterograph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/68-2.5%20在异构图上进行消息传递%20—%20DGL%201.1.3%20documentation.pdf

第3章:构建图神经网络(GNN)模块

文档地址:https://docs.dgl.ai/guide_cn/nn.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/69-第3章:构建图神经网络(GNN)模块%20—%20DGL%201.1.3%20documentation.pdf

3.1 DGL NN模块的构造函数

文档地址:https://docs.dgl.ai/guide_cn/nn-construction.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/70-3.1%20DGL%20NN模块的构造函数%20—%20DGL%201.1.3%20documentation.pdf

3.2 编写DGL NN模块的forward函数

文档地址:https://docs.dgl.ai/guide_cn/nn-forward.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/71-3.2%20编写DGL%20NN模块的forward函数%20—%20DGL%201.1.3%20documentation.pdf

3.3 异构图上的GraphConv模块

文档地址:https://docs.dgl.ai/guide_cn/nn-heterograph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/72-3.3%20异构图上的GraphConv模块%20—%20DGL%201.1.3%20documentation.pdf

第4章:图数据处理管道

文档地址:https://docs.dgl.ai/guide_cn/data.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/73-第4章:图数据处理管道%20—%20DGL%201.1.3%20documentation.pdf

4.1 DGLDataset类

文档地址:https://docs.dgl.ai/guide_cn/data-dataset.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/74-4.1%20DGLDataset类%20—%20DGL%201.1.3%20documentation.pdf

4.2 下载原始数据(可选)

文档地址:https://docs.dgl.ai/guide_cn/data-download.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/75-4.2%20下载原始数据(可选)%20—%20DGL%201.1.3%20documentation.pdf

4.3 处理数据

文档地址:https://docs.dgl.ai/guide_cn/data-process.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/76-4.3%20处理数据%20—%20DGL%201.1.3%20documentation.pdf

4.4 保存和加载数据

文档地址:https://docs.dgl.ai/guide_cn/data-savenload.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/77-4.4%20保存和加载数据%20—%20DGL%201.1.3%20documentation.pdf

4.5 使用ogb包导入OGB数据集

文档地址:https://docs.dgl.ai/guide_cn/data-loadogb.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/78-4.5%20使用ogb包导入OGB数据集%20—%20DGL%201.1.3%20documentation.pdf

第5章:训练图神经网络

文档地址:https://docs.dgl.ai/guide_cn/training.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/79-第5章:训练图神经网络%20—%20DGL%201.1.3%20documentation.pdf

5.1 节点分类/回归

文档地址:https://docs.dgl.ai/guide_cn/training-node.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/80-5.1%20节点分类_回归%20—%20DGL%201.1.3%20documentation.pdf

5.2 边分类/回归

文档地址:https://docs.dgl.ai/guide_cn/training-edge.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/81-5.2%20边分类_回归%20—%20DGL%201.1.3%20documentation.pdf

5.3 链接预测

文档地址:https://docs.dgl.ai/guide_cn/training-link.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/82-5.3%20链接预测%20—%20DGL%201.1.3%20documentation.pdf

5.4 整图分类

文档地址:https://docs.dgl.ai/guide_cn/training-graph.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/83-5.4%20整图分类%20—%20DGL%201.1.3%20documentation.pdf

第6章:在大图上的随机(批次)训练

文档地址:https://docs.dgl.ai/guide_cn/minibatch.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/84-第6章:在大图上的随机(批次)训练%20—%20DGL%201.1.3%20documentation.pdf

6.1 针对节点分类任务的邻居采样训练方法

文档地址:https://docs.dgl.ai/guide_cn/minibatch-node.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/85-6.1%20针对节点分类任务的邻居采样训练方法%20—%20DGL%201.1.3%20documentation.pdf

6.2 针对边分类任务的邻居采样训练方法

文档地址:https://docs.dgl.ai/guide_cn/minibatch-edge.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/86-6.2%20针对边分类任务的邻居采样训练方法%20—%20DGL%201.1.3%20documentation.pdf

6.3 针对链接预测任务的邻居采样训练方法

文档地址:https://docs.dgl.ai/guide_cn/minibatch-link.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/87-6.3%20针对链接预测任务的邻居采样训练方法%20—%20DGL%201.1.3%20documentation.pdf

6.4 定制用户自己的邻居采样器

文档地址:https://docs.dgl.ai/guide_cn/minibatch-custom-sampler.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/88-6.4%20定制用户自己的邻居采样器%20—%20DGL%201.1.3%20documentation.pdf

6.5 为小批次训练实现定制化的GNN模块

文档地址:https://docs.dgl.ai/guide_cn/minibatch-nn.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/89-6.5%20为小批次训练实现定制化的GNN模块%20—%20DGL%201.1.3%20documentation.pdf

6.6 超大图上的精准离线推断

文档地址:https://docs.dgl.ai/guide_cn/minibatch-inference.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/90-6.6%20超大图上的精准离线推断%20—%20DGL%201.1.3%20documentation.pdf

第7章:分布式训练

文档地址:https://docs.dgl.ai/guide_cn/distributed.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/91-第7章:分布式训练%20—%20DGL%201.1.3%20documentation.pdf

7.1 分布式训练所需的图数据预处理

文档地址:https://docs.dgl.ai/guide_cn/distributed-preprocessing.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/92-7.1%20分布式训练所需的图数据预处理%20—%20DGL%201.1.3%20documentation.pdf

7.2 分布式计算的API

文档地址:https://docs.dgl.ai/guide_cn/distributed-apis.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/93-7.2%20分布式计算的API%20—%20DGL%201.1.3%20documentation.pdf

7.3 运行分布式训练/推断所需的工具

文档地址:https://docs.dgl.ai/guide_cn/distributed-tools.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/94-7.3%20运行分布式训练_推断所需的工具%20—%20DGL%201.1.3%20documentation.pdf

Relational Graph Convolutional Network

文档地址:https://docs.dgl.ai/tutorials/models/1_gnn/4_rgcn.html

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/95-Relational%20Graph%20Convolutional%20Network%20—%20DGL%201.1.3%20documentation.pdf

文档地址:https://github.com/dmlc/dgl/blob/master/examples/pytorch/rgcn/link.py

参考文档:

  1. dgl.data.FB15k237Dataset
  2. dgl.DGLGraph.edges
  3. torch.unique
  4. dgl.norm_by_dst
  5. numpy.tile
  6. random.randint
  7. random.uniform
  8. dgl.DGLGraph.find_edges
  9. numpy.unique
  10. numpy.stack
  11. dgl.dataloading.GraphDataLoader
  12. torch.utils.data.DataLoader
  13. tutorials/beginner/basics/data_tutorial.html
  14. dgl.nn.tensorflow.conv.RelGraphConv
  15. dgl.nn.pytorch.conv.RelGraphConv
  16. torch.nn.functional.binary_cross_entropy_with_logits
  17. torch.nn.utils.clip_grad_norm_
  18. torch.sort
  19. torch.nonzero

笔记 pdf 地址:https://cdn.jsdelivr.net/gh/LuYF-Lemon-love/susu-docs-pdf/dgl/96-dgl_examples_pytorch_rgcn_link.py%20at%20master%20·%20dmlc_dgl%20·%20GitHub.pdf

结语

第一百零五篇博文写完,开心!!!!

今天,也是充满希望的一天。


文章作者: LuYF-Lemon-love
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 LuYF-Lemon-love !
  目录