|
1 | 1 | .. _apinn-pytorch:
|
2 | 2 |
|
3 |
| -dgl.nn.pytorch |
4 |
| -============== |
| 3 | +NN Modules (PyTorch) |
| 4 | +==================== |
5 | 5 |
|
6 |
| -dgl.nn.pytorch.conv |
7 |
| -------------------- |
| 6 | +.. contents:: Contents |
| 7 | + :local: |
| 8 | + |
| 9 | +We welcome your contribution! If you want a model to be implemented in DGL as a NN module, |
| 10 | +please `create an issue <https://github.com/dmlc/dgl/issues>`_ started with "[Feature Request] NN Module XXXModel". |
| 11 | + |
| 12 | +If you want to contribute a NN module, please `create a pull request <https://github.com/dmlc/dgl/pulls>`_ started |
| 13 | +with "[NN] XXXModel in PyTorch NN Modules" and our team member would review this PR. |
| 14 | + |
| 15 | +Conv Layers |
| 16 | +---------------------------------------- |
8 | 17 |
|
9 | 18 | .. automodule:: dgl.nn.pytorch.conv
|
10 | 19 |
|
| 20 | +GraphConv |
| 21 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 22 | + |
11 | 23 | .. autoclass:: dgl.nn.pytorch.conv.GraphConv
|
12 | 24 | :members: weight, bias, forward, reset_parameters
|
13 | 25 | :show-inheritance:
|
| 26 | + |
| 27 | +RelGraphConv |
| 28 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
14 | 29 |
|
15 | 30 | .. autoclass:: dgl.nn.pytorch.conv.RelGraphConv
|
16 | 31 | :members: forward
|
17 | 32 | :show-inheritance:
|
| 33 | + |
| 34 | +TAGConv |
| 35 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
18 | 36 |
|
19 | 37 | .. autoclass:: dgl.nn.pytorch.conv.TAGConv
|
20 | 38 | :members: forward
|
21 | 39 | :show-inheritance:
|
| 40 | + |
| 41 | +GATConv |
| 42 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
22 | 43 |
|
23 | 44 | .. autoclass:: dgl.nn.pytorch.conv.GATConv
|
24 | 45 | :members: forward
|
25 | 46 | :show-inheritance:
|
| 47 | + |
| 48 | +EdgeConv |
| 49 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
26 | 50 |
|
27 | 51 | .. autoclass:: dgl.nn.pytorch.conv.EdgeConv
|
28 | 52 | :members: forward
|
29 | 53 | :show-inheritance:
|
| 54 | + |
| 55 | +SAGEConv |
| 56 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
30 | 57 |
|
31 | 58 | .. autoclass:: dgl.nn.pytorch.conv.SAGEConv
|
32 | 59 | :members: forward
|
33 | 60 | :show-inheritance:
|
| 61 | + |
| 62 | +SGConv |
| 63 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
34 | 64 |
|
35 | 65 | .. autoclass:: dgl.nn.pytorch.conv.SGConv
|
36 | 66 | :members: forward
|
37 | 67 | :show-inheritance:
|
| 68 | + |
| 69 | +APPNPConv |
| 70 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
38 | 71 |
|
39 | 72 | .. autoclass:: dgl.nn.pytorch.conv.APPNPConv
|
40 | 73 | :members: forward
|
41 | 74 | :show-inheritance:
|
| 75 | + |
| 76 | +GINConv |
| 77 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
42 | 78 |
|
43 | 79 | .. autoclass:: dgl.nn.pytorch.conv.GINConv
|
44 | 80 | :members: forward
|
45 | 81 | :show-inheritance:
|
| 82 | + |
| 83 | +GatedGraphConv |
| 84 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
46 | 85 |
|
47 | 86 | .. autoclass:: dgl.nn.pytorch.conv.GatedGraphConv
|
48 | 87 | :members: forward
|
49 | 88 | :show-inheritance:
|
| 89 | + |
| 90 | +GMMConv |
| 91 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
50 | 92 |
|
51 | 93 | .. autoclass:: dgl.nn.pytorch.conv.GMMConv
|
52 | 94 | :members: forward
|
53 | 95 | :show-inheritance:
|
| 96 | + |
| 97 | +ChebConv |
| 98 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
54 | 99 |
|
55 | 100 | .. autoclass:: dgl.nn.pytorch.conv.ChebConv
|
56 | 101 | :members: forward
|
57 | 102 | :show-inheritance:
|
| 103 | + |
| 104 | +AGNNConv |
| 105 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
58 | 106 |
|
59 | 107 | .. autoclass:: dgl.nn.pytorch.conv.AGNNConv
|
60 | 108 | :members: forward
|
61 | 109 | :show-inheritance:
|
| 110 | + |
| 111 | +NNConv |
| 112 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
62 | 113 |
|
63 | 114 | .. autoclass:: dgl.nn.pytorch.conv.NNConv
|
64 | 115 | :members: forward
|
65 | 116 | :show-inheritance:
|
| 117 | + |
| 118 | +Dense Conv Layers |
| 119 | +---------------------------------------- |
| 120 | + |
| 121 | +DenseGraphConv |
| 122 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
66 | 123 |
|
67 | 124 | .. autoclass:: dgl.nn.pytorch.conv.DenseGraphConv
|
68 | 125 | :members: forward
|
69 | 126 | :show-inheritance:
|
| 127 | + |
| 128 | +DenseSAGEConv |
| 129 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
70 | 130 |
|
71 | 131 | .. autoclass:: dgl.nn.pytorch.conv.DenseSAGEConv
|
72 | 132 | :members: forward
|
73 | 133 | :show-inheritance:
|
| 134 | + |
| 135 | +DenseChebConv |
| 136 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
74 | 137 |
|
75 | 138 | .. autoclass:: dgl.nn.pytorch.conv.DenseChebConv
|
76 | 139 | :members: forward
|
77 | 140 | :show-inheritance:
|
| 141 | + |
| 142 | +Global Pooling Layers |
| 143 | +---------------------------------------- |
78 | 144 |
|
79 |
| -dgl.nn.pytorch.glob |
80 |
| -------------------- |
81 | 145 | .. automodule:: dgl.nn.pytorch.glob
|
82 | 146 |
|
| 147 | +SumPooling |
| 148 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 149 | + |
83 | 150 | .. autoclass:: dgl.nn.pytorch.glob.SumPooling
|
84 | 151 | :members:
|
85 | 152 | :show-inheritance:
|
| 153 | + |
| 154 | +AvgPooling |
| 155 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
86 | 156 |
|
87 | 157 | .. autoclass:: dgl.nn.pytorch.glob.AvgPooling
|
88 | 158 | :members:
|
89 | 159 | :show-inheritance:
|
| 160 | + |
| 161 | +MaxPooling |
| 162 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
90 | 163 |
|
91 | 164 | .. autoclass:: dgl.nn.pytorch.glob.MaxPooling
|
92 | 165 | :members:
|
93 | 166 | :show-inheritance:
|
| 167 | + |
| 168 | +SortPooling |
| 169 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
94 | 170 |
|
95 | 171 | .. autoclass:: dgl.nn.pytorch.glob.SortPooling
|
96 | 172 | :members:
|
97 | 173 | :show-inheritance:
|
| 174 | + |
| 175 | +GlobalAttentionPooling |
| 176 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
98 | 177 |
|
99 | 178 | .. autoclass:: dgl.nn.pytorch.glob.GlobalAttentionPooling
|
100 | 179 | :members:
|
101 | 180 | :show-inheritance:
|
| 181 | + |
| 182 | +Set2Set |
| 183 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
102 | 184 |
|
103 | 185 | .. autoclass:: dgl.nn.pytorch.glob.Set2Set
|
104 | 186 | :members: forward
|
105 | 187 | :show-inheritance:
|
| 188 | + |
| 189 | +SetTransformerEncoder |
| 190 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
106 | 191 |
|
107 | 192 | .. autoclass:: dgl.nn.pytorch.glob.SetTransformerEncoder
|
108 | 193 | :members:
|
109 | 194 | :show-inheritance:
|
| 195 | + |
| 196 | +SetTransformerDecoder |
| 197 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
110 | 198 |
|
111 | 199 | .. autoclass:: dgl.nn.pytorch.glob.SetTransformerDecoder
|
112 | 200 | :members:
|
113 | 201 | :show-inheritance:
|
| 202 | + |
| 203 | +Utility Modules |
| 204 | +---------------------------------------- |
114 | 205 |
|
115 |
| -dgl.nn.pytorch.softmax |
116 |
| ----------------------- |
117 |
| - |
118 |
| -.. automodule:: dgl.nn.pytorch.softmax |
119 |
| - :members: edge_softmax |
120 |
| - |
121 |
| -dgl.nn.pytorch.factory |
122 |
| ----------------------- |
123 |
| - |
124 |
| -.. automodule:: dgl.nn.pytorch.conv |
| 206 | +KNNGraph |
| 207 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
125 | 208 |
|
126 | 209 | .. autoclass:: dgl.nn.pytorch.factory.KNNGraph
|
127 | 210 | :members:
|
128 | 211 | :show-inheritance:
|
| 212 | + |
| 213 | +SegmentedKNNGraph |
| 214 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
129 | 215 |
|
130 | 216 | .. autoclass:: dgl.nn.pytorch.factory.SegmentedKNNGraph
|
131 | 217 | :members:
|
132 | 218 | :show-inheritance:
|
| 219 | + |
| 220 | +Edge Softmax |
| 221 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 222 | + |
| 223 | +.. automodule:: dgl.nn.pytorch.softmax |
| 224 | + :members: edge_softmax |
| 225 | + |
| 226 | + |
0 commit comments