"tests/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "51843fd7d043428b5ef3bb77cc683e5339b2d95e"
Unverified Commit 1f7b2195 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[Doc] User guide section 5 and 6 (#2029)

* [Doc] User guide section 5 and 6

* oops

* fix
parent 2fc280ba
......@@ -78,6 +78,21 @@ Using Node/edge features
DGLHeteroGraph.local_var
DGLHeteroGraph.local_scope
Using Node/edge features for blocks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please refer to :ref:`guide-minibatch` for the definition of blocks.
.. autosummary::
:toctree: ../../generated/
DGLHeteroGraph.number_of_src_nodes
DGLHeteroGraph.number_of_dst_nodes
DGLHeteroGraph.srcnodes
DGLHeteroGraph.srcdata
DGLHeteroGraph.dstnodes
DGLHeteroGraph.dstdata
Transforming graph
------------------
......@@ -88,6 +103,7 @@ Transforming graph
DGLHeteroGraph.edge_subgraph
DGLHeteroGraph.node_type_subgraph
DGLHeteroGraph.edge_type_subgraph
DGLHeteroGraph.__getitem__
Computing with DGLHeteroGraph
-----------------------------
......
......@@ -30,6 +30,8 @@ General collating functions
.. autoclass:: EdgeCollator
:members: dataset, collate
.. _api-dataloading-neighbor-sampling:
Neighborhood Sampling Classes
-----------------------------
......@@ -45,7 +47,7 @@ Uniform Node-wise Neighbor Sampling (GraphSAGE style)
.. autoclass:: MultiLayerNeighborSampler
:members: sample_frontier
.. _negative-sampling:
.. _api-dataloading-negative-sampling:
Negative Samplers for Link Prediction
-------------------------------------
......
......@@ -22,6 +22,8 @@ Graph Create Ops
knn_graph
segmented_knn_graph
.. _api-subgraph-extraction:
Subgraph Extraction Routines
-------------------------------------
......
......@@ -186,6 +186,15 @@ Set2Set
:members:
:show-inheritance:
Heterogeneous Graph Convolution Module
----------------------------------------
HeteroGraphConv
~~~~~~~~~~~~~~~
.. autoclass:: dgl.nn.mxnet.HeteroGraphConv
:members:
:show-inheritance:
Utility Modules
----------------------------------------
......
......@@ -222,6 +222,16 @@ SetTransformerDecoder
:members:
:show-inheritance:
Heterogeneous Graph Convolution Module
----------------------------------------
HeteroGraphConv
~~~~~~~~~~~~~~~
.. autoclass:: dgl.nn.pytorch.HeteroGraphConv
:members:
:show-inheritance:
Utility Modules
----------------------------------------
......
......@@ -106,3 +106,13 @@ GlobalAttentionPooling
.. autoclass:: dgl.nn.tensorflow.glob.GlobalAttentionPooling
:members:
:show-inheritance:
Heterogeneous Graph Convolution Module
----------------------------------------
HeteroGraphConv
~~~~~~~~~~~~~~~
.. autoclass:: dgl.nn.tensorflow.HeteroGraphConv
:members:
:show-inheritance:
.. _guide-data-pipeline:
Graph data input pipeline in DGL
==================================
......
.. _guide-message-passing:
Message Passing
===============
......@@ -288,4 +290,4 @@ string represents the cross type reducer. The reducer can be one of
# Trigger message passing of multiple types.
G.multi_update_all(funcs, 'sum')
# return the updated node feature dictionary
return {ntype : G.nodes[ntype].data['h'] for ntype in G.ntypes}
\ No newline at end of file
return {ntype : G.nodes[ntype].data['h'] for ntype in G.ntypes}
This diff is collapsed.
Build DGL NN Module
===================
.. _guide-nn:
Building DGL NN Module
======================
DGL NN module is the building block for your GNN model. It inherents
from `Pytorch’s NN Module <https://pytorch.org/docs/1.2.0/_modules/torch/nn/modules/module.html>`__, `MXNet Gluon’s NN Blcok <http://mxnet.incubator.apache.org/versions/1.6/api/python/docs/api/gluon/nn/index.html>`__ and `TensorFlow’s Keras
from `Pytorch’s NN Module <https://pytorch.org/docs/1.2.0/_modules/torch/nn/modules/module.html>`__, `MXNet Gluon’s NN Block <http://mxnet.incubator.apache.org/versions/1.6/api/python/docs/api/gluon/nn/index.html>`__ and `TensorFlow’s Keras
Layer <https://www.tensorflow.org/api_docs/python/tf/keras/layers>`__, depending on the DNN framework backend we are using. In DGL NN
module, the parameter registration in construction function and tensor
operation in forward function are the same with the backend framework.
......@@ -264,8 +266,7 @@ The code actually does message passing and reducing computing. This part
of code varies module by module. Note that all the message passings in
the above code are implemented using ``update_all()`` API and
``built-in`` message/reduce functions to fully utilize DGL’s performance
optimization as described in the `Message Passing User Guide
Section <https://docs.dgl.ai/guide/message.html>`__.
optimization as described in :ref:`guide-message-passing`.
Update feature after reducing for output
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
This diff is collapsed.
......@@ -435,7 +435,7 @@ class EdgeCollator(Collator):
or a dictionary of edge types and such pairs if the graph is heterogenenous.
A set of builtin negative samplers are provided in
:ref:`the negative sampling module <negative-sampling>`.
:ref:`the negative sampling module <api-dataloading-negative-sampling>`.
Examples
--------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment