dgl.nn¶
The dgl.nn
package contains framework-specific implementations for
common Graph Neural Network layers (or module in PyTorch, Block in MXNet).
Users can directly import dgl.nn.<layer_name>
(e.g., dgl.nn.GraphConv
),
and the package will dispatch the layer name to the actual implementation
according to the backend framework currently in use.
Note that there are coverage differences among frameworks. If you encounter
an ImportError: cannot import name 'XXX'
error, that means the layer is
not available to the current backend. If you wish a module to appear in DGL,
please create an issue started with
“[Feature Request] NN Module XXXModel”. If you want to contribute a NN module,
please create a pull request started
with “[NN] XXX module”.