Skip to content

Commit 54e3db2

Browse files
Merge pull request #34 from CarloLucibello/cl/docs
doc update
2 parents 88a8487 + 115b097 commit 54e3db2

File tree

11 files changed

+84
-16
lines changed

11 files changed

+84
-16
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ GraphNeuralNetworks.jl is a registered julia package.
1919
You can easily install it through the package manager:
2020

2121
```julia
22-
julia> ]
23-
2422
pkg> add GraphNeuralNetworks
2523
```
2624

docs/src/api/basic.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
15
# Basic Layers
26

7+
## Index
8+
39
```@index
410
Order = [:type, :function]
5-
Modules = [GraphNeuralNetworks, LightGraphs, Flux, NNlib]
11+
Modules = [GraphNeuralNetworks]
612
Pages = ["api/basics.md"]
713
```
814

15+
## Docs
16+
917
```@docs
1018
GNNLayer
1119
GNNChain

docs/src/api/conv.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
15
# Convolutional Layers
26

7+
## Index
8+
39
```@index
410
Order = [:type, :function]
5-
Pages = ["api/conv.md"]
11+
Pages = ["conv.md"]
612
```
713

14+
## Docs
15+
816
```@autodocs
917
Modules = [GraphNeuralNetworks]
1018
Pages = ["layers/conv.jl"]

docs/src/api/gnngraph.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
# Graphs
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
5+
# GNNGraph
6+
7+
Documentation page for the graph type `GNNGraph` provided GraphNeuralNetworks.jl and its related methods.
8+
9+
## Index
210

311
```@index
412
Order = [:type, :function]
5-
Pages = ["api/graphs.md"]
13+
Pages = ["graphs.md"]
614
```
715

16+
## Docs
17+
818
```@autodocs
919
Modules = [GraphNeuralNetworks]
1020
Pages = ["gnngraph.jl"]
1121
Private = false
1222
```
23+
1324
```@docs
1425
Flux.batch
1526
SparseArrays.blockdiag

docs/src/api/messagepassing.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
15
# Message Passing
26

7+
## Index
8+
9+
```@index
10+
Order = [:type, :function]
11+
Pages = ["messagepassing.md"]
12+
```
13+
14+
## Docs
15+
316
```@docs
4-
GraphNeuralNetworks.compute_message
5-
GraphNeuralNetworks.update_node
6-
GraphNeuralNetworks.propagate
17+
compute_message
18+
update_node
19+
update_edge
20+
propagate
721
```

docs/src/api/nnlib.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
15
# NNlib
26

37
Primitive functions implemented in NNlib.jl.
48

9+
## Index
10+
11+
```@index
12+
Order = [:type, :function]
13+
Pages = ["nnlib.md"]
14+
```
15+
16+
## Docs
17+
518
```@docs
619
NNlib.gather!
720
NNlib.gather

docs/src/api/pool.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
```@meta
2+
CurrentModule = GraphNeuralNetworks
3+
```
4+
15
# Pooling Layers
26

7+
## Index
8+
39
```@index
410
Order = [:type, :function]
5-
Pages = ["api/pool.md"]
11+
Pages = ["pool.md"]
612
```
713

14+
## Docs
15+
816
```@autodocs
917
Modules = [GraphNeuralNetworks]
1018
Pages = ["layers/pool.jl"]

docs/src/messagepassing.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ The message passing is initiated by [`propagate`](@ref)
44
and can be customized for a specific layer by overloading the methods
55
[`compute_message`](@ref), [`update_node`](@ref), and [`update_edge`](@ref).
66

7-
87
The message passing corresponds to the following operations
98

109
```math
@@ -26,7 +25,7 @@ The convolution reads
2625
```math
2726
\mathbf{x}'_i = \sum_{j \in N(i)} \frac{1}{c_{ij}} W \mathbf{x}_j
2827
```
29-
where ``c_{ij} = \sqrt{(|N(i)|)(|N(j)|)}``. We will also add a bias and an activation function.
28+
where ``c_{ij} = \sqrt{|N(i)||N(j)|}``. We will also add a bias and an activation function.
3029

3130
```julia
3231
using Flux, LightGraphs, GraphNeuralNetworks
@@ -60,5 +59,3 @@ end
6059
```
6160

6261
See the [`GATConv`](@ref) implementation [here](https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/src/layers/conv.jl) for a more complex example.
63-
64-

src/GraphNeuralNetworks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export
3131
sprand, sparse,
3232

3333
# msgpass
34-
# update_node, update_edge, compute_message, propagate,
34+
update_node, update_edge, compute_message, propagate,
3535

3636
# layers/basic
3737
GNNLayer,

src/gnngraph.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,17 @@ end
240240
LightGraphs.is_directed(::GNNGraph) = true
241241
LightGraphs.is_directed(::Type{GNNGraph}) = true
242242

243+
"""
244+
adjacency_list(g; dir=:out)
245+
246+
Return the adjacency list representation (a vector of vectors)
247+
of the graph `g`.
248+
249+
Calling `a` the adjacency list, if `dir=:out`
250+
`a[i]` will contain the neighbors of node `i` through
251+
outgoing edges. If `dir=:in`, it will contain neighbors from
252+
incoming edges instead.
253+
"""
243254
function adjacency_list(g::GNNGraph; dir=:out)
244255
@assert dir [:out, :in]
245256
fneighs = dir == :out ? outneighbors : inneighbors

0 commit comments

Comments
 (0)