From c2d4e1f2dbe3ccff6dd684ad5f1f7a9f94ab2b43 Mon Sep 17 00:00:00 2001
From: "Documenter.jl" <documenter@juliadocs.github.io>
Date: Sun, 28 Jan 2024 17:54:18 +0000
Subject: [PATCH] build based on 7ddadab

---
 dev/api/basic/index.html                      |  6 ++--
 dev/api/conv/index.html                       | 24 +++++++-------
 dev/api/gnngraph/index.html                   | 32 +++++++++----------
 dev/api/heterograph/index.html                |  4 +--
 dev/api/messagepassing/index.html             |  4 +--
 dev/api/pool/index.html                       |  6 ++--
 dev/api/temporalgraph/index.html              | 10 +++---
 dev/api/utils/index.html                      |  6 ++--
 dev/datasets/index.html                       |  2 +-
 dev/dev/index.html                            |  2 +-
 dev/gnngraph/index.html                       |  2 +-
 dev/gsoc/index.html                           |  2 +-
 dev/heterograph/index.html                    |  2 +-
 dev/index.html                                |  2 +-
 dev/messagepassing/index.html                 |  2 +-
 dev/models/index.html                         |  2 +-
 dev/search/index.html                         |  2 +-
 dev/temporalgraph/index.html                  |  2 +-
 dev/tutorials/index.html                      |  2 +-
 .../gnn_intro_pluto/index.html                |  2 +-
 .../graph_classification_pluto/index.html     |  2 +-
 .../node_classification_pluto/index.html      |  2 +-
 .../traffic_prediction/index.html             |  2 +-
 23 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/dev/api/basic/index.html b/dev/api/basic/index.html
index b56c48673..ef45d46e4 100644
--- a/dev/api/basic/index.html
+++ b/dev/api/basic/index.html
@@ -9,7 +9,7 @@
 
 julia&gt; dotdec(g, rand(2, 5))
 1×6 Matrix{Float64}:
- 0.345098  0.458305  0.106353  0.345098  0.458305  0.106353</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/basic.jl#L193-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNChain" href="#GraphNeuralNetworks.GNNChain"><code>GraphNeuralNetworks.GNNChain</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GNNChain(layers...)
+ 0.345098  0.458305  0.106353  0.345098  0.458305  0.106353</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/basic.jl#L193-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNChain" href="#GraphNeuralNetworks.GNNChain"><code>GraphNeuralNetworks.GNNChain</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GNNChain(layers...)
 GNNChain(name = layer, ...)</code></pre><p>Collects multiple layers / functions to be called in sequence on given input graph and input node features. </p><p>It allows to compose layers in a sequential fashion as <code>Flux.Chain</code> does, propagating the output of each layer to the next one. In addition, <code>GNNChain</code> handles the input graph as well, providing it  as a first argument only to layers subtyping the <a href="#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a> abstract type. </p><p><code>GNNChain</code> supports indexing and slicing, <code>m[2]</code> or <code>m[1:end-1]</code>, and if names are given, <code>m[:name] == m[1]</code> etc.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using Flux, GraphNeuralNetworks
 
 julia&gt; m = GNNChain(GCNConv(2=&gt;5), 
@@ -41,7 +41,7 @@
  2.90053  2.90053  2.90053  2.90053  2.90053  2.90053
 
 julia&gt; m2[:enc](g, x) == m(g, x)
-true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/basic.jl#L60-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNLayer" href="#GraphNeuralNetworks.GNNLayer"><code>GraphNeuralNetworks.GNNLayer</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">abstract type GNNLayer end</code></pre><p>An abstract type from which graph neural network layers are derived.</p><p>See also <a href="#GraphNeuralNetworks.GNNChain"><code>GNNChain</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/basic.jl#L1-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.WithGraph" href="#GraphNeuralNetworks.WithGraph"><code>GraphNeuralNetworks.WithGraph</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">WithGraph(model, g::GNNGraph; traingraph=false)</code></pre><p>A type wrapping the <code>model</code> and tying it to the graph <code>g</code>. In the forward pass, can only take feature arrays as inputs, returning <code>model(g, x...; kws...)</code>.</p><p>If <code>traingraph=false</code>, the graph&#39;s parameters won&#39;t be part of  the <code>trainable</code> parameters in the gradient updates.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">g = GNNGraph([1,2,3], [2,3,1])
+true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/basic.jl#L60-L111">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNLayer" href="#GraphNeuralNetworks.GNNLayer"><code>GraphNeuralNetworks.GNNLayer</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">abstract type GNNLayer end</code></pre><p>An abstract type from which graph neural network layers are derived.</p><p>See also <a href="#GraphNeuralNetworks.GNNChain"><code>GNNChain</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/basic.jl#L1-L7">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.WithGraph" href="#GraphNeuralNetworks.WithGraph"><code>GraphNeuralNetworks.WithGraph</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">WithGraph(model, g::GNNGraph; traingraph=false)</code></pre><p>A type wrapping the <code>model</code> and tying it to the graph <code>g</code>. In the forward pass, can only take feature arrays as inputs, returning <code>model(g, x...; kws...)</code>.</p><p>If <code>traingraph=false</code>, the graph&#39;s parameters won&#39;t be part of  the <code>trainable</code> parameters in the gradient updates.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">g = GNNGraph([1,2,3], [2,3,1])
 x = rand(Float32, 2, 3)
 model = SAGEConv(2 =&gt; 3)
 wg = WithGraph(model, g)
@@ -51,4 +51,4 @@
 g2 = GNNGraph([1,1,2,3], [2,4,1,1])
 x2 = rand(Float32, 2, 4)
 # WithGraph will ignore the internal graph if fed with a new one. 
-@assert wg(g2, x2) == model(g2, x2)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/basic.jl#L20-L45">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../gnngraph/">« GNNGraph</a><a class="docs-footer-nextpage" href="../conv/">Convolutional Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+@assert wg(g2, x2) == model(g2, x2)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/basic.jl#L20-L45">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../gnngraph/">« GNNGraph</a><a class="docs-footer-nextpage" href="../conv/">Convolutional Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/conv/index.html b/dev/api/conv/index.html
index fe1c83f96..662c2c4c4 100644
--- a/dev/api/conv/index.html
+++ b/dev/api/conv/index.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Convolutional Layers · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li class="is-active"><a class="tocitem" href>Convolutional Layers</a><ul class="internal"><li><a class="tocitem" href="#Docs"><span>Docs</span></a></li></ul></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>Convolutional Layers</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Convolutional Layers</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/conv.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Convolutional-Layers"><a class="docs-heading-anchor" href="#Convolutional-Layers">Convolutional Layers</a><a id="Convolutional-Layers-1"></a><a class="docs-heading-anchor-permalink" href="#Convolutional-Layers" title="Permalink"></a></h1><p>Many different types of graphs convolutional layers have been proposed in the literature. Choosing the right layer for your application could involve a lot of exploration.  Some of the most commonly used layers are the <a href="#GraphNeuralNetworks.GCNConv"><code>GCNConv</code></a> and the <a href="#GraphNeuralNetworks.GATv2Conv"><code>GATv2Conv</code></a>. Multiple graph convolutional layers are typically stacked together to create a graph neural network model (see <a href="../basic/#GraphNeuralNetworks.GNNChain"><code>GNNChain</code></a>).</p><p>The table below lists all graph convolutional layers implemented in the <em>GraphNeuralNetworks.jl</em>. It also highlights the presence of some additional capabilities with respect to basic message passing:</p><ul><li><em>Sparse Ops</em>: implements message passing as multiplication by sparse adjacency matrix instead of the gather/scatter mechanism. This can lead to better cpu performances but it is not supported on gpu yet. </li><li><em>Edge Weight</em>: supports scalar weights (or equivalently scalar features) on edges. </li><li><em>Edge Features</em>: supports feature vectors on edges.</li><li><em>Heterograph</em>: supports heterogeneous graphs (see <a href="api/@ref"><code>GNNHeteroGraphs</code></a>).</li></ul><table><tr><th style="text-align: left">Layer</th><th style="text-align: center">Sparse Ops</th><th style="text-align: center">Edge Weight</th><th style="text-align: center">Edge Features</th><th style="text-align: center">Heterograph</th></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.AGNNConv"><code>AGNNConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.CGConv"><code>CGConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.ChebConv"><code>ChebConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.EGNNConv"><code>EGNNConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.EdgeConv"><code>EdgeConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GATConv"><code>GATConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GATv2Conv"><code>GATv2Conv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GatedGraphConv"><code>GatedGraphConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GCNConv"><code>GCNConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GINConv"><code>GINConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GMMConv"><code>GMMConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.GraphConv"><code>GraphConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.MEGNetConv"><code>MEGNetConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.NNConv"><code>NNConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.ResGatedGraphConv"><code>ResGatedGraphConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.SAGEConv"><code>SAGEConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.SGConv"><code>SGConv</code></a></td><td style="text-align: center">✓</td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center"></td></tr><tr><td style="text-align: left"><a href="#GraphNeuralNetworks.TransformerConv"><code>TransformerConv</code></a></td><td style="text-align: center"></td><td style="text-align: center"></td><td style="text-align: center">✓</td><td style="text-align: center"></td></tr></table><h2 id="Docs"><a class="docs-heading-anchor" href="#Docs">Docs</a><a id="Docs-1"></a><a class="docs-heading-anchor-permalink" href="#Docs" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.AGNNConv" href="#GraphNeuralNetworks.AGNNConv"><code>GraphNeuralNetworks.AGNNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">AGNNConv(; init_beta=1.0f0, trainable=true, add_self_loops=true)</code></pre><p>Attention-based Graph Neural Network layer from paper <a href="https://arxiv.org/abs/1803.03735">Attention-based Graph Neural Network for Semi-Supervised Learning</a>.</p><p>The forward pass is given by</p><p class="math-container">\[\mathbf{x}_i&#39; = \sum_{j \in N(i)} \alpha_{ij} \mathbf{x}_j\]</p><p>where the attention coefficients <span>$\alpha_{ij}$</span> are given by</p><p class="math-container">\[\alpha_{ij} =\frac{e^{\beta \cos(\mathbf{x}_i, \mathbf{x}_j)}}
                   {\sum_{j&#39;}e^{\beta \cos(\mathbf{x}_i, \mathbf{x}_{j&#39;})}}\]</p><p>with the cosine distance defined by</p><p class="math-container">\[\cos(\mathbf{x}_i, \mathbf{x}_j) = 
-  \frac{\mathbf{x}_i \cdot \mathbf{x}_j}{\lVert\mathbf{x}_i\rVert \lVert\mathbf{x}_j\rVert}\]</p><p>and <span>$\beta$</span> a trainable parameter if <code>trainable=true</code>.</p><p><strong>Arguments</strong></p><ul><li><code>init_beta</code>: The initial value of <span>$\beta$</span>. Default 1.0f0.</li><li><code>trainable</code>: If true, <span>$\beta$</span> is trainable. Default <code>true</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L988-L1015">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.CGConv" href="#GraphNeuralNetworks.CGConv"><code>GraphNeuralNetworks.CGConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">CGConv((in, ein) =&gt; out, act=identity; bias=true, init=glorot_uniform, residual=false)
+  \frac{\mathbf{x}_i \cdot \mathbf{x}_j}{\lVert\mathbf{x}_i\rVert \lVert\mathbf{x}_j\rVert}\]</p><p>and <span>$\beta$</span> a trainable parameter if <code>trainable=true</code>.</p><p><strong>Arguments</strong></p><ul><li><code>init_beta</code>: The initial value of <span>$\beta$</span>. Default 1.0f0.</li><li><code>trainable</code>: If true, <span>$\beta$</span> is trainable. Default <code>true</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L991-L1018">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.CGConv" href="#GraphNeuralNetworks.CGConv"><code>GraphNeuralNetworks.CGConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">CGConv((in, ein) =&gt; out, act=identity; bias=true, init=glorot_uniform, residual=false)
 CGConv(in =&gt; out, ...)</code></pre><p>The crystal graph convolutional layer from the paper <a href="https://arxiv.org/pdf/1710.10324.pdf">Crystal Graph Convolutional Neural Networks for an Accurate and Interpretable Prediction of Material Properties</a>. Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \mathbf{x}_i + \sum_{j\in N(i)}\sigma(W_f \mathbf{z}_{ij} + \mathbf{b}_f)\, act(W_s \mathbf{z}_{ij} + \mathbf{b}_s)\]</p><p>where <span>$\mathbf{z}_{ij}$</span>  is the node and edge features concatenation  <span>$[\mathbf{x}_i; \mathbf{x}_j; \mathbf{e}_{j\to i}]$</span>  and <span>$\sigma$</span> is the sigmoid function. The residual <span>$\mathbf{x}_i$</span> is added only if <code>residual=true</code> and the output size is the same  as the input size.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input node features.</li><li><code>ein</code>: The dimension of input edge features. </li></ul><p>If <code>ein</code> is not given, assumes that no edge features are passed as input in the forward pass.</p><ul><li><code>out</code>: The dimension of output node features.</li><li><code>act</code>: Activation function.</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li><li><code>residual</code>: Add a residual connection.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs">g = rand_graph(5, 6)
 x = rand(Float32, 2, g.num_nodes)
 e = rand(Float32, 3, g.num_edges)
@@ -11,11 +11,11 @@
 
 # No edge features
 l = CGConv(2 =&gt; 4, tanh)
-y = l(g, x)    # size: (4, num_nodes)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L883-L927">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.ChebConv" href="#GraphNeuralNetworks.ChebConv"><code>GraphNeuralNetworks.ChebConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ChebConv(in =&gt; out, k; bias=true, init=glorot_uniform)</code></pre><p>Chebyshev spectral graph convolutional layer from paper <a href="https://arxiv.org/abs/1606.09375">Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering</a>.</p><p>Implements</p><p class="math-container">\[X&#39; = \sum^{K-1}_{k=0}  W^{(k)} Z^{(k)}\]</p><p>where <span>$Z^{(k)}$</span> is the <span>$k$</span>-th term of Chebyshev polynomials, and can be calculated by the following recursive form:</p><p class="math-container">\[\begin{aligned}
+y = l(g, x)    # size: (4, num_nodes)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L886-L930">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.ChebConv" href="#GraphNeuralNetworks.ChebConv"><code>GraphNeuralNetworks.ChebConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ChebConv(in =&gt; out, k; bias=true, init=glorot_uniform)</code></pre><p>Chebyshev spectral graph convolutional layer from paper <a href="https://arxiv.org/abs/1606.09375">Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering</a>.</p><p>Implements</p><p class="math-container">\[X&#39; = \sum^{K-1}_{k=0}  W^{(k)} Z^{(k)}\]</p><p>where <span>$Z^{(k)}$</span> is the <span>$k$</span>-th term of Chebyshev polynomials, and can be calculated by the following recursive form:</p><p class="math-container">\[\begin{aligned}
 Z^{(0)} &amp;= X \\
 Z^{(1)} &amp;= \hat{L} X \\
 Z^{(k)} &amp;= 2 \hat{L} Z^{(k-1)} - Z^{(k-2)}
-\end{aligned}\]</p><p>with <span>$\hat{L}$</span> the <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>scaled_laplacian</code></a>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>k</code>: The order of Chebyshev polynomial.</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L159-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.EGNNConv" href="#GraphNeuralNetworks.EGNNConv"><code>GraphNeuralNetworks.EGNNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">EdgeConv((in, ein) =&gt; out; hidden_size=2in, residual=false)
+\end{aligned}\]</p><p>with <span>$\hat{L}$</span> the <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>scaled_laplacian</code></a>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>k</code>: The order of Chebyshev polynomial.</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L159-L190">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.EGNNConv" href="#GraphNeuralNetworks.EGNNConv"><code>GraphNeuralNetworks.EGNNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">EdgeConv((in, ein) =&gt; out; hidden_size=2in, residual=false)
 EdgeConv(in =&gt; out; hidden_size=2in, residual=false)</code></pre><p>Equivariant Graph Convolutional Layer from <a href="https://arxiv.org/abs/2102.09844">E(n) Equivariant Graph Neural Networks</a>.</p><p>The layer performs the following operation:</p><p class="math-container">\[\begin{aligned}
 \mathbf{m}_{j\to i} &amp;=\phi_e(\mathbf{h}_i, \mathbf{h}_j, \lVert\mathbf{x}_i-\mathbf{x}_j\rVert^2, \mathbf{e}_{j\to i}),\\
 \mathbf{x}_i&#39; &amp;= \mathbf{x}_i + C_i\sum_{j\in\mathcal{N}(i)}(\mathbf{x}_i-\mathbf{x}_j)\phi_x(\mathbf{m}_{j\to i}),\\
@@ -25,9 +25,9 @@
 h = randn(Float32, 5, g.num_nodes)
 x = randn(Float32, 3, g.num_nodes)
 egnn = EGNNConv(5 =&gt; 6, 10)
-hnew, xnew = egnn(g, h, x)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1358-L1411">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.EdgeConv" href="#GraphNeuralNetworks.EdgeConv"><code>GraphNeuralNetworks.EdgeConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">EdgeConv(nn; aggr=max)</code></pre><p>Edge convolutional layer from paper <a href="https://arxiv.org/abs/1801.07829">Dynamic Graph CNN for Learning on Point Clouds</a>.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \square_{j \in N(i)}\, nn([\mathbf{x}_i; \mathbf{x}_j - \mathbf{x}_i])\]</p><p>where <code>nn</code> generally denotes a learnable function, e.g. a linear layer or a multi-layer perceptron.</p><p><strong>Arguments</strong></p><ul><li><code>nn</code>: A (possibly learnable) function. </li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L614-L630">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GATConv" href="#GraphNeuralNetworks.GATConv"><code>GraphNeuralNetworks.GATConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GATConv(in =&gt; out, [σ; heads, concat, init, bias, negative_slope, add_self_loops])
-GATConv((in, ein) =&gt; out, ...)</code></pre><p>Graph attentional layer from the paper <a href="https://arxiv.org/abs/1710.10903">Graph Attention Networks</a>.</p><p>Implements the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \sum_{j \in N(i) \cup \{i\}} \alpha_{ij} W \mathbf{x}_j\]</p><p>where the attention coefficients <span>$\alpha_{ij}$</span> are given by</p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(LeakyReLU(\mathbf{a}^T [W \mathbf{x}_i; W \mathbf{x}_j]))\]</p><p>with <span>$z_i$</span> a normalization factor. </p><p>In case <code>ein &gt; 0</code> is given, edge features of dimension <code>ein</code> will be expected in the forward pass  and the attention coefficients will be calculated as  </p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(LeakyReLU(\mathbf{a}^T [W_e \mathbf{e}_{j\to i}; W \mathbf{x}_i; W \mathbf{x}_j]))\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input node features.</li><li><code>ein</code>: The dimension of input edge features. Default 0 (i.e. no edge features passed in the forward).</li><li><code>out</code>: The dimension of output node features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Learn the additive bias if true. Default <code>true</code>.</li><li><code>heads</code>: Number attention heads. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged over the heads. Default <code>true</code>.</li><li><code>negative_slope</code>: The parameter of LeakyReLU.Default <code>0.2</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L288-L321">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GATv2Conv" href="#GraphNeuralNetworks.GATv2Conv"><code>GraphNeuralNetworks.GATv2Conv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GATv2Conv(in =&gt; out, [σ; heads, concat, init, bias, negative_slope, add_self_loops])
-GATv2Conv((in, ein) =&gt; out, ...)</code></pre><p>GATv2 attentional layer from the paper <a href="https://arxiv.org/abs/2105.14491">How Attentive are Graph Attention Networks?</a>.</p><p>Implements the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \sum_{j \in N(i) \cup \{i\}} \alpha_{ij} W_1 \mathbf{x}_j\]</p><p>where the attention coefficients <span>$\alpha_{ij}$</span> are given by</p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(\mathbf{a}^T LeakyReLU(W_2 \mathbf{x}_i + W_1 \mathbf{x}_j))\]</p><p>with <span>$z_i$</span> a normalization factor.</p><p>In case <code>ein &gt; 0</code> is given, edge features of dimension <code>ein</code> will be expected in the forward pass  and the attention coefficients will be calculated as  </p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(\mathbf{a}^T LeakyReLU(W_3 \mathbf{e}_{j\to i} + W_2 \mathbf{x}_i + W_1 \mathbf{x}_j)).\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input node features.</li><li><code>ein</code>: The dimension of input edge features. Default 0 (i.e. no edge features passed in the forward).</li><li><code>out</code>: The dimension of output node features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Learn the additive bias if true. Default <code>true</code>.</li><li><code>heads</code>: Number attention heads. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged over the heads. Default <code>true</code>.</li><li><code>negative_slope</code>: The parameter of LeakyReLU.Default <code>0.2</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L415-L449">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GCNConv" href="#GraphNeuralNetworks.GCNConv"><code>GraphNeuralNetworks.GCNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GCNConv(in =&gt; out, σ=identity; [bias, init, add_self_loops, use_edge_weight])</code></pre><p>Graph convolutional layer from paper <a href="https://arxiv.org/abs/1609.02907">Semi-supervised Classification with Graph Convolutional Networks</a>.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}&#39;_i = \sum_{j\in N(i)} a_{ij} W \mathbf{x}_j\]</p><p>where <span>$a_{ij} = 1 / \sqrt{|N(i)||N(j)|}$</span> is a normalization factor computed from the node degrees. </p><p>If the input graph has weighted edges and <code>use_edge_weight=true</code>, than <span>$a_{ij}$</span> will be computed as</p><p class="math-container">\[a_{ij} = \frac{e_{j\to i}}{\sqrt{\sum_{j \in N(i)}  e_{j\to i}} \sqrt{\sum_{i \in N(j)}  e_{i\to j}}}\]</p><p>The input to the layer is a node feature array <code>X</code> of size <code>(num_features, num_nodes)</code> and optionally an edge weight vector.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input features.</li><li><code>out</code>: Number of output features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>false</code>.</li><li><code>use_edge_weight</code>: If <code>true</code>, consider the edge weights in the input graph (if available).                    If <code>add_self_loops=true</code> the new weights will be set to 1.                     This option is ignored if the <code>edge_weight</code> is explicitly provided in the forward pass.                    Default <code>false</code>.</li></ul><p><strong>Forward</strong></p><pre><code class="nohighlight hljs">(::GCNConv)(g::GNNGraph, x::AbstractMatrix, edge_weight = nothing, norm_fn::Function = d -&gt; 1 ./ sqrt.(d)) -&gt; AbstractMatrix</code></pre><p>Takes as input a graph <code>g</code>,ca node feature matrix <code>x</code> of size <code>[in, num_nodes]</code>, and optionally an edge weight vector. Returns a node feature matrix of size  <code>[out, num_nodes]</code>.</p><p>The <code>norm_fn</code> parameter allows for custom normalization of the graph convolution operation by passing a function as argument.  By default, it computes <span>$\frac{1}{\sqrt{d}}$</span> i.e the inverse square root of the degree (<code>d</code>) of each node in the graph. </p><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
+hnew, xnew = egnn(g, h, x)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1361-L1414">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.EdgeConv" href="#GraphNeuralNetworks.EdgeConv"><code>GraphNeuralNetworks.EdgeConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">EdgeConv(nn; aggr=max)</code></pre><p>Edge convolutional layer from paper <a href="https://arxiv.org/abs/1801.07829">Dynamic Graph CNN for Learning on Point Clouds</a>.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \square_{j \in N(i)}\, nn([\mathbf{x}_i; \mathbf{x}_j - \mathbf{x}_i])\]</p><p>where <code>nn</code> generally denotes a learnable function, e.g. a linear layer or a multi-layer perceptron.</p><p><strong>Arguments</strong></p><ul><li><code>nn</code>: A (possibly learnable) function. </li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L614-L630">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GATConv" href="#GraphNeuralNetworks.GATConv"><code>GraphNeuralNetworks.GATConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GATConv(in =&gt; out, [σ; heads, concat, init, bias, negative_slope, add_self_loops])
+GATConv((in, ein) =&gt; out, ...)</code></pre><p>Graph attentional layer from the paper <a href="https://arxiv.org/abs/1710.10903">Graph Attention Networks</a>.</p><p>Implements the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \sum_{j \in N(i) \cup \{i\}} \alpha_{ij} W \mathbf{x}_j\]</p><p>where the attention coefficients <span>$\alpha_{ij}$</span> are given by</p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(LeakyReLU(\mathbf{a}^T [W \mathbf{x}_i; W \mathbf{x}_j]))\]</p><p>with <span>$z_i$</span> a normalization factor. </p><p>In case <code>ein &gt; 0</code> is given, edge features of dimension <code>ein</code> will be expected in the forward pass  and the attention coefficients will be calculated as  </p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(LeakyReLU(\mathbf{a}^T [W_e \mathbf{e}_{j\to i}; W \mathbf{x}_i; W \mathbf{x}_j]))\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input node features.</li><li><code>ein</code>: The dimension of input edge features. Default 0 (i.e. no edge features passed in the forward).</li><li><code>out</code>: The dimension of output node features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Learn the additive bias if true. Default <code>true</code>.</li><li><code>heads</code>: Number attention heads. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged over the heads. Default <code>true</code>.</li><li><code>negative_slope</code>: The parameter of LeakyReLU.Default <code>0.2</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L288-L321">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GATv2Conv" href="#GraphNeuralNetworks.GATv2Conv"><code>GraphNeuralNetworks.GATv2Conv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GATv2Conv(in =&gt; out, [σ; heads, concat, init, bias, negative_slope, add_self_loops])
+GATv2Conv((in, ein) =&gt; out, ...)</code></pre><p>GATv2 attentional layer from the paper <a href="https://arxiv.org/abs/2105.14491">How Attentive are Graph Attention Networks?</a>.</p><p>Implements the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \sum_{j \in N(i) \cup \{i\}} \alpha_{ij} W_1 \mathbf{x}_j\]</p><p>where the attention coefficients <span>$\alpha_{ij}$</span> are given by</p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(\mathbf{a}^T LeakyReLU(W_2 \mathbf{x}_i + W_1 \mathbf{x}_j))\]</p><p>with <span>$z_i$</span> a normalization factor.</p><p>In case <code>ein &gt; 0</code> is given, edge features of dimension <code>ein</code> will be expected in the forward pass  and the attention coefficients will be calculated as  </p><p class="math-container">\[\alpha_{ij} = \frac{1}{z_i} \exp(\mathbf{a}^T LeakyReLU(W_3 \mathbf{e}_{j\to i} + W_2 \mathbf{x}_i + W_1 \mathbf{x}_j)).\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input node features.</li><li><code>ein</code>: The dimension of input edge features. Default 0 (i.e. no edge features passed in the forward).</li><li><code>out</code>: The dimension of output node features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Learn the additive bias if true. Default <code>true</code>.</li><li><code>heads</code>: Number attention heads. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged over the heads. Default <code>true</code>.</li><li><code>negative_slope</code>: The parameter of LeakyReLU.Default <code>0.2</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L415-L449">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GCNConv" href="#GraphNeuralNetworks.GCNConv"><code>GraphNeuralNetworks.GCNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GCNConv(in =&gt; out, σ=identity; [bias, init, add_self_loops, use_edge_weight])</code></pre><p>Graph convolutional layer from paper <a href="https://arxiv.org/abs/1609.02907">Semi-supervised Classification with Graph Convolutional Networks</a>.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}&#39;_i = \sum_{j\in N(i)} a_{ij} W \mathbf{x}_j\]</p><p>where <span>$a_{ij} = 1 / \sqrt{|N(i)||N(j)|}$</span> is a normalization factor computed from the node degrees. </p><p>If the input graph has weighted edges and <code>use_edge_weight=true</code>, than <span>$a_{ij}$</span> will be computed as</p><p class="math-container">\[a_{ij} = \frac{e_{j\to i}}{\sqrt{\sum_{j \in N(i)}  e_{j\to i}} \sqrt{\sum_{i \in N(j)}  e_{i\to j}}}\]</p><p>The input to the layer is a node feature array <code>X</code> of size <code>(num_features, num_nodes)</code> and optionally an edge weight vector.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input features.</li><li><code>out</code>: Number of output features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>false</code>.</li><li><code>use_edge_weight</code>: If <code>true</code>, consider the edge weights in the input graph (if available).                    If <code>add_self_loops=true</code> the new weights will be set to 1.                     This option is ignored if the <code>edge_weight</code> is explicitly provided in the forward pass.                    Default <code>false</code>.</li></ul><p><strong>Forward</strong></p><pre><code class="nohighlight hljs">(::GCNConv)(g::GNNGraph, x::AbstractMatrix, edge_weight = nothing, norm_fn::Function = d -&gt; 1 ./ sqrt.(d)) -&gt; AbstractMatrix</code></pre><p>Takes as input a graph <code>g</code>,ca node feature matrix <code>x</code> of size <code>[in, num_nodes]</code>, and optionally an edge weight vector. Returns a node feature matrix of size  <code>[out, num_nodes]</code>.</p><p>The <code>norm_fn</code> parameter allows for custom normalization of the graph convolution operation by passing a function as argument.  By default, it computes <span>$\frac{1}{\sqrt{d}}$</span> i.e the inverse square root of the degree (<code>d</code>) of each node in the graph. </p><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
 s = [1,1,2,3]
 t = [2,3,1,1]
 g = GNNGraph(s, t)
@@ -47,7 +47,7 @@
 # Edge weights can also be embedded in the graph.
 g = GNNGraph(s, t, w)
 l = GCNConv(3 =&gt; 5, use_edge_weight=true) 
-y = l(g, x) # same as l(g, x, w) </code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GINConv" href="#GraphNeuralNetworks.GINConv"><code>GraphNeuralNetworks.GINConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GINConv(f, ϵ; aggr=+)</code></pre><p>Graph Isomorphism convolutional layer from paper <a href="https://arxiv.org/pdf/1810.00826.pdf">How Powerful are Graph Neural Networks?</a>.</p><p>Implements the graph convolution</p><p class="math-container">\[\mathbf{x}_i&#39; = f_\Theta\left((1 + \epsilon) \mathbf{x}_i + \sum_{j \in N(i)} \mathbf{x}_j \right)\]</p><p>where <span>$f_\Theta$</span> typically denotes a learnable function, e.g. a linear layer or a multi-layer perceptron.</p><p><strong>Arguments</strong></p><ul><li><code>f</code>: A (possibly learnable) function acting on node features. </li><li><code>ϵ</code>: Weighting factor.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L653-L668">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GMMConv" href="#GraphNeuralNetworks.GMMConv"><code>GraphNeuralNetworks.GMMConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GMMConv((in, ein) =&gt; out, σ=identity; K=1, bias=true, init=glorot_uniform, residual=false)</code></pre><p>Graph mixture model convolution layer from the paper <a href="https://arxiv.org/abs/1611.08402">Geometric deep learning on graphs and manifolds using mixture model CNNs</a> Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \mathbf{x}_i + \frac{1}{|N(i)|} \sum_{j\in N(i)}\frac{1}{K}\sum_{k=1}^K \mathbf{w}_k(\mathbf{e}_{j\to i}) \odot \Theta_k \mathbf{x}_j\]</p><p>where <span>$w^a_{k}(e^a)$</span> for feature <code>a</code> and kernel <code>k</code> is given by</p><p class="math-container">\[w^a_{k}(e^a) = \exp(-\frac{1}{2}(e^a - \mu^a_k)^T (\Sigma^{-1})^a_k(e^a - \mu^a_k))\]</p><p><span>$\Theta_k, \mu^a_k, (\Sigma^{-1})^a_k$</span> are learnable parameters.</p><p>The input to the layer is a node feature array <code>x</code> of size <code>(num_features, num_nodes)</code> and edge pseudo-coordinate array <code>e</code> of size <code>(num_features, num_edges)</code> The residual <span>$\mathbf{x}_i$</span> is added only if <code>residual=true</code> and the output size is the same  as the input size.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input node features.</li><li><code>ein</code>: Number of input edge features.</li><li><code>out</code>: Number of output features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>K</code>: Number of kernels. Default <code>1</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>residual</code>: Residual conncetion. Default <code>false</code>.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
+y = l(g, x) # same as l(g, x, w) </code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1-L69">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GINConv" href="#GraphNeuralNetworks.GINConv"><code>GraphNeuralNetworks.GINConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GINConv(f, ϵ; aggr=+)</code></pre><p>Graph Isomorphism convolutional layer from paper <a href="https://arxiv.org/pdf/1810.00826.pdf">How Powerful are Graph Neural Networks?</a>.</p><p>Implements the graph convolution</p><p class="math-container">\[\mathbf{x}_i&#39; = f_\Theta\left((1 + \epsilon) \mathbf{x}_i + \sum_{j \in N(i)} \mathbf{x}_j \right)\]</p><p>where <span>$f_\Theta$</span> typically denotes a learnable function, e.g. a linear layer or a multi-layer perceptron.</p><p><strong>Arguments</strong></p><ul><li><code>f</code>: A (possibly learnable) function acting on node features. </li><li><code>ϵ</code>: Weighting factor.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L656-L671">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GMMConv" href="#GraphNeuralNetworks.GMMConv"><code>GraphNeuralNetworks.GMMConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GMMConv((in, ein) =&gt; out, σ=identity; K=1, bias=true, init=glorot_uniform, residual=false)</code></pre><p>Graph mixture model convolution layer from the paper <a href="https://arxiv.org/abs/1611.08402">Geometric deep learning on graphs and manifolds using mixture model CNNs</a> Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = \mathbf{x}_i + \frac{1}{|N(i)|} \sum_{j\in N(i)}\frac{1}{K}\sum_{k=1}^K \mathbf{w}_k(\mathbf{e}_{j\to i}) \odot \Theta_k \mathbf{x}_j\]</p><p>where <span>$w^a_{k}(e^a)$</span> for feature <code>a</code> and kernel <code>k</code> is given by</p><p class="math-container">\[w^a_{k}(e^a) = \exp(-\frac{1}{2}(e^a - \mu^a_k)^T (\Sigma^{-1})^a_k(e^a - \mu^a_k))\]</p><p><span>$\Theta_k, \mu^a_k, (\Sigma^{-1})^a_k$</span> are learnable parameters.</p><p>The input to the layer is a node feature array <code>x</code> of size <code>(num_features, num_nodes)</code> and edge pseudo-coordinate array <code>e</code> of size <code>(num_features, num_edges)</code> The residual <span>$\mathbf{x}_i$</span> is added only if <code>residual=true</code> and the output size is the same  as the input size.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input node features.</li><li><code>ein</code>: Number of input edge features.</li><li><code>out</code>: Number of output features.</li><li><code>σ</code>: Activation function. Default <code>identity</code>.</li><li><code>K</code>: Number of kernels. Default <code>1</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>residual</code>: Residual conncetion. Default <code>false</code>.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
 s = [1,1,2,3]
 t = [2,3,1,1]
 g = GNNGraph(s,t)
@@ -59,10 +59,10 @@
 l = GMMConv((nin, ein) =&gt; out, K=K)
 
 # forward pass
-l(g, x, e)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1118-L1165">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GatedGraphConv" href="#GraphNeuralNetworks.GatedGraphConv"><code>GraphNeuralNetworks.GatedGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GatedGraphConv(out, num_layers; aggr=+, init=glorot_uniform)</code></pre><p>Gated graph convolution layer from <a href="https://arxiv.org/abs/1511.05493">Gated Graph Sequence Neural Networks</a>.</p><p>Implements the recursion</p><p class="math-container">\[\begin{aligned}
+l(g, x, e)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1121-L1168">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GatedGraphConv" href="#GraphNeuralNetworks.GatedGraphConv"><code>GraphNeuralNetworks.GatedGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GatedGraphConv(out, num_layers; aggr=+, init=glorot_uniform)</code></pre><p>Gated graph convolution layer from <a href="https://arxiv.org/abs/1511.05493">Gated Graph Sequence Neural Networks</a>.</p><p>Implements the recursion</p><p class="math-container">\[\begin{aligned}
 \mathbf{h}^{(0)}_i &amp;= [\mathbf{x}_i; \mathbf{0}] \\
 \mathbf{h}^{(l)}_i &amp;= GRU(\mathbf{h}^{(l-1)}_i, \square_{j \in N(i)} W \mathbf{h}^{(l-1)}_j)
-\end{aligned}\]</p><p>where <span>$\mathbf{h}^{(l)}_i$</span> denotes the <span>$l$</span>-th hidden variables passing through GRU. The dimension of input <span>$\mathbf{x}_i$</span> needs to be less or equal to <code>out</code>.</p><p><strong>Arguments</strong></p><ul><li><code>out</code>: The dimension of output features.</li><li><code>num_layers</code>: The number of gated recurrent unit.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>init</code>: Weight initialization function.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L550-L571">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GraphConv" href="#GraphNeuralNetworks.GraphConv"><code>GraphNeuralNetworks.GraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GraphConv(in =&gt; out, σ=identity; aggr=+, bias=true, init=glorot_uniform)</code></pre><p>Graph convolution layer from Reference: <a href="https://arxiv.org/abs/1810.02244">Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks</a>.</p><p>Performs:</p><p class="math-container">\[\mathbf{x}_i&#39; = W_1 \mathbf{x}_i + \square_{j \in \mathcal{N}(i)} W_2 \mathbf{x}_j\]</p><p>where the aggregation type is selected by <code>aggr</code>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>σ</code>: Activation function.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L231-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.MEGNetConv" href="#GraphNeuralNetworks.MEGNetConv"><code>GraphNeuralNetworks.MEGNetConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">MEGNetConv(ϕe, ϕv; aggr=mean)
+\end{aligned}\]</p><p>where <span>$\mathbf{h}^{(l)}_i$</span> denotes the <span>$l$</span>-th hidden variables passing through GRU. The dimension of input <span>$\mathbf{x}_i$</span> needs to be less or equal to <code>out</code>.</p><p><strong>Arguments</strong></p><ul><li><code>out</code>: The dimension of output features.</li><li><code>num_layers</code>: The number of gated recurrent unit.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>init</code>: Weight initialization function.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L550-L571">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GraphConv" href="#GraphNeuralNetworks.GraphConv"><code>GraphNeuralNetworks.GraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GraphConv(in =&gt; out, σ=identity; aggr=+, bias=true, init=glorot_uniform)</code></pre><p>Graph convolution layer from Reference: <a href="https://arxiv.org/abs/1810.02244">Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks</a>.</p><p>Performs:</p><p class="math-container">\[\mathbf{x}_i&#39; = W_1 \mathbf{x}_i + \square_{j \in \mathcal{N}(i)} W_2 \mathbf{x}_j\]</p><p>where the aggregation type is selected by <code>aggr</code>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>σ</code>: Activation function.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L231-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.MEGNetConv" href="#GraphNeuralNetworks.MEGNetConv"><code>GraphNeuralNetworks.MEGNetConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">MEGNetConv(ϕe, ϕv; aggr=mean)
 MEGNetConv(in =&gt; out; aggr=mean)</code></pre><p>Convolution from <a href="https://arxiv.org/pdf/1812.05055.pdf">Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals</a> paper. In the forward pass, takes as inputs node features <code>x</code> and edge features <code>e</code> and returns updated features <code>x&#39;</code> and <code>e&#39;</code> according to </p><p class="math-container">\[\begin{aligned}
 \mathbf{e}_{i\to j}&#39;  = \phi_e([\mathbf{x}_i;\,  \mathbf{x}_j;\,  \mathbf{e}_{i\to j}]),\\
 \mathbf{x}_{i}&#39;  = \phi_v([\mathbf{x}_i;\, \square_{j\in \mathcal{N}(i)}\,\mathbf{e}_{j\to i}&#39;]).
@@ -70,7 +70,7 @@
 x = randn(3, 10)
 e = randn(3, 30)
 m = MEGNetConv(3 =&gt; 3)
-x′, e′ = m(g, x, e)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1047-L1077">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.NNConv" href="#GraphNeuralNetworks.NNConv"><code>GraphNeuralNetworks.NNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">NNConv(in =&gt; out, f, σ=identity; aggr=+, bias=true, init=glorot_uniform)</code></pre><p>The continuous kernel-based convolutional operator from the  <a href="https://arxiv.org/abs/1704.01212">Neural Message Passing for Quantum Chemistry</a> paper.  This convolution is also known as the edge-conditioned convolution from the  <a href="https://arxiv.org/abs/1704.02901">Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs</a> paper.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = W \mathbf{x}_i + \square_{j \in N(i)} f_\Theta(\mathbf{e}_{j\to i})\,\mathbf{x}_j\]</p><p>where <span>$f_\Theta$</span>  denotes a learnable function (e.g. a linear layer or a multi-layer perceptron). Given an input of batched edge features <code>e</code> of size <code>(num_edge_features, num_edges)</code>,  the function <code>f</code> will return an batched matrices array whose size is <code>(out, in, num_edges)</code>. For convenience, also functions returning a single <code>(out*in, num_edges)</code> matrix are allowed.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>f</code>: A (possibly learnable) function acting on edge features.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>σ</code>: Activation function.</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L692-L720">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.ResGatedGraphConv" href="#GraphNeuralNetworks.ResGatedGraphConv"><code>GraphNeuralNetworks.ResGatedGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ResGatedGraphConv(in =&gt; out, act=identity; init=glorot_uniform, bias=true)</code></pre><p>The residual gated graph convolutional operator from the <a href="https://arxiv.org/abs/1711.07553">Residual Gated Graph ConvNets</a> paper.</p><p>The layer&#39;s forward pass is given by</p><p class="math-container">\[\mathbf{x}_i&#39; = act\big(U\mathbf{x}_i + \sum_{j \in N(i)} \eta_{ij} V \mathbf{x}_j\big),\]</p><p>where the edge gates <span>$\eta_{ij}$</span> are given by</p><p class="math-container">\[\eta_{ij} = sigmoid(A\mathbf{x}_i + B\mathbf{x}_j).\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>act</code>: Activation function.</li><li><code>init</code>: Weight matrices&#39; initializing function. </li><li><code>bias</code>: Learn an additive bias if true.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L816-L839">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.SAGEConv" href="#GraphNeuralNetworks.SAGEConv"><code>GraphNeuralNetworks.SAGEConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">SAGEConv(in =&gt; out, σ=identity; aggr=mean, bias=true, init=glorot_uniform)</code></pre><p>GraphSAGE convolution layer from paper <a href="https://arxiv.org/pdf/1706.02216.pdf">Inductive Representation Learning on Large Graphs</a>.</p><p>Performs:</p><p class="math-container">\[\mathbf{x}_i&#39; = W \cdot [\mathbf{x}_i; \square_{j \in \mathcal{N}(i)} \mathbf{x}_j]\]</p><p>where the aggregation type is selected by <code>aggr</code>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>σ</code>: Activation function.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L763-L783">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.SGConv" href="#GraphNeuralNetworks.SGConv"><code>GraphNeuralNetworks.SGConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">SGConv(int =&gt; out, k=1; [bias, init, add_self_loops, use_edge_weight])</code></pre><p>SGC layer from <a href="https://arxiv.org/pdf/1902.07153.pdf">Simplifying Graph Convolutional Networks</a> Performs operation</p><p class="math-container">\[H^{K} = (\tilde{D}^{-1/2} \tilde{A} \tilde{D}^{-1/2})^K X \Theta\]</p><p>where <span>$\tilde{A}$</span> is <span>$A + I$</span>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input features.</li><li><code>out</code>: Number of output features.</li><li><code>k</code> : Number of hops k. Default <code>1</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>false</code>.</li><li><code>use_edge_weight</code>: If <code>true</code>, consider the edge weights in the input graph (if available).                    If <code>add_self_loops=true</code> the new weights will be set to 1. Default <code>false</code>.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
+x′, e′ = m(g, x, e)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1050-L1080">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.NNConv" href="#GraphNeuralNetworks.NNConv"><code>GraphNeuralNetworks.NNConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">NNConv(in =&gt; out, f, σ=identity; aggr=+, bias=true, init=glorot_uniform)</code></pre><p>The continuous kernel-based convolutional operator from the  <a href="https://arxiv.org/abs/1704.01212">Neural Message Passing for Quantum Chemistry</a> paper.  This convolution is also known as the edge-conditioned convolution from the  <a href="https://arxiv.org/abs/1704.02901">Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs</a> paper.</p><p>Performs the operation</p><p class="math-container">\[\mathbf{x}_i&#39; = W \mathbf{x}_i + \square_{j \in N(i)} f_\Theta(\mathbf{e}_{j\to i})\,\mathbf{x}_j\]</p><p>where <span>$f_\Theta$</span>  denotes a learnable function (e.g. a linear layer or a multi-layer perceptron). Given an input of batched edge features <code>e</code> of size <code>(num_edge_features, num_edges)</code>,  the function <code>f</code> will return an batched matrices array whose size is <code>(out, in, num_edges)</code>. For convenience, also functions returning a single <code>(out*in, num_edges)</code> matrix are allowed.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>f</code>: A (possibly learnable) function acting on edge features.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>σ</code>: Activation function.</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L695-L723">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.ResGatedGraphConv" href="#GraphNeuralNetworks.ResGatedGraphConv"><code>GraphNeuralNetworks.ResGatedGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">ResGatedGraphConv(in =&gt; out, act=identity; init=glorot_uniform, bias=true)</code></pre><p>The residual gated graph convolutional operator from the <a href="https://arxiv.org/abs/1711.07553">Residual Gated Graph ConvNets</a> paper.</p><p>The layer&#39;s forward pass is given by</p><p class="math-container">\[\mathbf{x}_i&#39; = act\big(U\mathbf{x}_i + \sum_{j \in N(i)} \eta_{ij} V \mathbf{x}_j\big),\]</p><p>where the edge gates <span>$\eta_{ij}$</span> are given by</p><p class="math-container">\[\eta_{ij} = sigmoid(A\mathbf{x}_i + B\mathbf{x}_j).\]</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>act</code>: Activation function.</li><li><code>init</code>: Weight matrices&#39; initializing function. </li><li><code>bias</code>: Learn an additive bias if true.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L819-L842">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.SAGEConv" href="#GraphNeuralNetworks.SAGEConv"><code>GraphNeuralNetworks.SAGEConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">SAGEConv(in =&gt; out, σ=identity; aggr=mean, bias=true, init=glorot_uniform)</code></pre><p>GraphSAGE convolution layer from paper <a href="https://arxiv.org/pdf/1706.02216.pdf">Inductive Representation Learning on Large Graphs</a>.</p><p>Performs:</p><p class="math-container">\[\mathbf{x}_i&#39; = W \cdot [\mathbf{x}_i; \square_{j \in \mathcal{N}(i)} \mathbf{x}_j]\]</p><p>where the aggregation type is selected by <code>aggr</code>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: The dimension of input features.</li><li><code>out</code>: The dimension of output features.</li><li><code>σ</code>: Activation function.</li><li><code>aggr</code>: Aggregation operator for the incoming messages (e.g. <code>+</code>, <code>*</code>, <code>max</code>, <code>min</code>, and <code>mean</code>).</li><li><code>bias</code>: Add learnable bias.</li><li><code>init</code>: Weights&#39; initializer.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L766-L786">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.SGConv" href="#GraphNeuralNetworks.SGConv"><code>GraphNeuralNetworks.SGConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">SGConv(int =&gt; out, k=1; [bias, init, add_self_loops, use_edge_weight])</code></pre><p>SGC layer from <a href="https://arxiv.org/pdf/1902.07153.pdf">Simplifying Graph Convolutional Networks</a> Performs operation</p><p class="math-container">\[H^{K} = (\tilde{D}^{-1/2} \tilde{A} \tilde{D}^{-1/2})^K X \Theta\]</p><p>where <span>$\tilde{A}$</span> is <span>$A + I$</span>.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Number of input features.</li><li><code>out</code>: Number of output features.</li><li><code>k</code> : Number of hops k. Default <code>1</code>.</li><li><code>bias</code>: Add learnable bias. Default <code>true</code>.</li><li><code>init</code>: Weights&#39; initializer. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the graph before performing the convolution. Default <code>false</code>.</li><li><code>use_edge_weight</code>: If <code>true</code>, consider the edge weights in the input graph (if available).                    If <code>add_self_loops=true</code> the new weights will be set to 1. Default <code>false</code>.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs"># create data
 s = [1,1,2,3]
 t = [2,3,1,1]
 g = GNNGraph(s, t)
@@ -89,7 +89,7 @@
 # Edge weights can also be embedded in the graph.
 g = GNNGraph(s, t, w)
 l = SGConv(3 =&gt; 5, add_self_loops = true, use_edge_weight=true) 
-y = l(g, x) # same as l(g, x, w) </code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1235-L1280">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.TransformerConv" href="#GraphNeuralNetworks.TransformerConv"><code>GraphNeuralNetworks.TransformerConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">TransformerConv((in, ein) =&gt; out; [heads, concat, init, add_self_loops, bias_qkv,
+y = l(g, x) # same as l(g, x, w) </code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1238-L1283">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.TransformerConv" href="#GraphNeuralNetworks.TransformerConv"><code>GraphNeuralNetworks.TransformerConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">TransformerConv((in, ein) =&gt; out; [heads, concat, init, add_self_loops, bias_qkv,
     bias_root, root_weight, gating, skip_connection, batch_norm, ff_channels]))</code></pre><p>The transformer-like multi head attention convolutional operator from the  <a href="https://arxiv.org/abs/2009.03509">Masked Label Prediction: Unified Message Passing Model for Semi-Supervised  Classification</a> paper, which also considers  edge features. It further contains options to also be configured as the transformer-like convolutional operator from the  <a href="https://arxiv.org/abs/1706.03762">Attention, Learn to Solve Routing Problems!</a> paper, including a successive feed-forward network as well as skip layers and batch normalization.</p><p>The layer&#39;s basic forward pass is given by</p><p class="math-container">\[x_i&#39; = W_1x_i + \sum_{j\in N(i)} \alpha_{ij} (W_2 x_j + W_6e_{ij})\]</p><p>where the attention scores are</p><p class="math-container">\[\alpha_{ij} = \mathrm{softmax}\left(\frac{(W_3x_i)^T(W_4x_j+
 W_6e_{ij})}{\sqrt{d}}\right).\]</p><p>Optionally, a combination of the aggregated value with transformed root node features  by a gating mechanism via</p><p class="math-container">\[x&#39;_i = \beta_i W_1 x_i + (1 - \beta_i) \underbrace{\left(\sum_{j \in \mathcal{N}(i)}
-\alpha_{i,j} W_2 x_j \right)}_{=m_i}\]</p><p>with</p><p class="math-container">\[\beta_i = \textrm{sigmoid}(W_5^{\top} [ W_1 x_i, m_i, W_1 x_i - m_i ]).\]</p><p>can be performed.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Dimension of input features, which also corresponds to the dimension of    the output features.</li><li><code>ein</code>: Dimension of the edge features; if 0, no edge features will be used.</li><li><code>out</code>: Dimension of the output.</li><li><code>heads</code>: Number of heads in output. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged   over the heads. Default <code>true</code>.</li><li><code>init</code>: Weight matrices&#39; initializing function. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the input graph. Default <code>false</code>.</li><li><code>bias_qkv</code>: If set, bias is used in the key, query and value transformations for nodes.   Default <code>true</code>.</li><li><code>bias_root</code>: If set, the layer will also learn an additive bias for the root when root    weight is used. Default <code>true</code>.</li><li><code>root_weight</code>: If set, the layer will add the transformed root node features   to the output. Default <code>true</code>.</li><li><code>gating</code>: If set, will combine aggregation and transformed root node features by a   gating mechanism. Default <code>false</code>.</li><li><code>skip_connection</code>: If set, a skip connection will be made from the input and    added to the output. Default <code>false</code>.</li><li><code>batch_norm</code>: If set, a batch normalization will be applied to the output. Default <code>false</code>.</li><li><code>ff_channels</code>: If positive, a feed-forward NN is appended, with the first having the given   number of hidden nodes; this NN also gets a skip connection and batch normalization    if the respective parameters are set. Default: <code>0</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/conv.jl#L1499-L1558">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic Layers</a><a class="docs-footer-nextpage" href="../pool/">Pooling Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+\alpha_{i,j} W_2 x_j \right)}_{=m_i}\]</p><p>with</p><p class="math-container">\[\beta_i = \textrm{sigmoid}(W_5^{\top} [ W_1 x_i, m_i, W_1 x_i - m_i ]).\]</p><p>can be performed.</p><p><strong>Arguments</strong></p><ul><li><code>in</code>: Dimension of input features, which also corresponds to the dimension of    the output features.</li><li><code>ein</code>: Dimension of the edge features; if 0, no edge features will be used.</li><li><code>out</code>: Dimension of the output.</li><li><code>heads</code>: Number of heads in output. Default <code>1</code>.</li><li><code>concat</code>: Concatenate layer output or not. If not, layer output is averaged   over the heads. Default <code>true</code>.</li><li><code>init</code>: Weight matrices&#39; initializing function. Default <code>glorot_uniform</code>.</li><li><code>add_self_loops</code>: Add self loops to the input graph. Default <code>false</code>.</li><li><code>bias_qkv</code>: If set, bias is used in the key, query and value transformations for nodes.   Default <code>true</code>.</li><li><code>bias_root</code>: If set, the layer will also learn an additive bias for the root when root    weight is used. Default <code>true</code>.</li><li><code>root_weight</code>: If set, the layer will add the transformed root node features   to the output. Default <code>true</code>.</li><li><code>gating</code>: If set, will combine aggregation and transformed root node features by a   gating mechanism. Default <code>false</code>.</li><li><code>skip_connection</code>: If set, a skip connection will be made from the input and    added to the output. Default <code>false</code>.</li><li><code>batch_norm</code>: If set, a batch normalization will be applied to the output. Default <code>false</code>.</li><li><code>ff_channels</code>: If positive, a feed-forward NN is appended, with the first having the given   number of hidden nodes; this NN also gets a skip connection and batch normalization    if the respective parameters are set. Default: <code>0</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/conv.jl#L1502-L1561">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../basic/">« Basic Layers</a><a class="docs-footer-nextpage" href="../pool/">Pooling Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/gnngraph/index.html b/dev/api/gnngraph/index.html
index d107c8358..de3559e48 100644
--- a/dev/api/gnngraph/index.html
+++ b/dev/api/gnngraph/index.html
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>GNNGraph · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li class="is-active"><a class="tocitem" href>GNNGraph</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#GNNGraph-type"><span>GNNGraph type</span></a></li><li><a class="tocitem" href="#DataStore"><span>DataStore</span></a></li><li><a class="tocitem" href="#Query"><span>Query</span></a></li><li><a class="tocitem" href="#Transform"><span>Transform</span></a></li><li><a class="tocitem" href="#Generate"><span>Generate</span></a></li><li><a class="tocitem" href="#Operators"><span>Operators</span></a></li><li><a class="tocitem" href="#Sampling"><span>Sampling</span></a></li></ul></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li><a class="tocitem" href="../conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>GNNGraph</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>GNNGraph</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/gnngraph.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="GNNGraph"><a class="docs-heading-anchor" href="#GNNGraph">GNNGraph</a><a id="GNNGraph-1"></a><a class="docs-heading-anchor-permalink" href="#GNNGraph" title="Permalink"></a></h1><p>Documentation page for the graph type <code>GNNGraph</code> provided by GraphNeuralNetworks.jl and related methods. </p><p>Besides the methods documented here, one can rely on the large set of functionalities given by <a href="https://github.com/JuliaGraphs/Graphs.jl">Graphs.jl</a> thanks to the fact that <code>GNNGraph</code> inherits from <code>Graphs.AbstractGraph</code>.</p><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#GraphNeuralNetworks.GNNGraphs.DataStore"><code>GraphNeuralNetworks.GNNGraphs.DataStore</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GraphNeuralNetworks.GNNGraphs.GNNGraph</code></a></li><li><a href="#Base.intersect"><code>Base.intersect</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}"><code>GraphNeuralNetworks.GNNGraphs.add_nodes</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.adjacency_list</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.getgraph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_isolated_nodes</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_multi_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.is_bidirected</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.khop_adj"><code>GraphNeuralNetworks.GNNGraphs.khop_adj</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}"><code>GraphNeuralNetworks.GNNGraphs.knn_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max"><code>GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.negative_sample</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.normalized_laplacian"><code>GraphNeuralNetworks.GNNGraphs.normalized_laplacian</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}"><code>GraphNeuralNetworks.GNNGraphs.radius_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.rand_edge_split</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}"><code>GraphNeuralNetworks.GNNGraphs.rand_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_heterograph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.random_walk_pe</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_multi_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.sample_neighbors"><code>GraphNeuralNetworks.GNNGraphs.sample_neighbors</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>GraphNeuralNetworks.GNNGraphs.scaled_laplacian</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.set_edge_weight</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_bidirected</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_unidirected</code></a></li><li><a href="#Graphs.LinAlg.adjacency_matrix"><code>Graphs.LinAlg.adjacency_matrix</code></a></li><li><a href="#Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}"><code>Graphs.degree</code></a></li><li><a href="#Graphs.has_self_loops-Tuple{GNNGraph}"><code>Graphs.has_self_loops</code></a></li><li><a href="#Graphs.inneighbors"><code>Graphs.inneighbors</code></a></li><li><a href="#Graphs.outneighbors"><code>Graphs.outneighbors</code></a></li><li><a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>MLUtils.batch</code></a></li><li><a href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>MLUtils.unbatch</code></a></li><li><a href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a></li></ul><h2 id="GNNGraph-type"><a class="docs-heading-anchor" href="#GNNGraph-type">GNNGraph type</a><a id="GNNGraph-type-1"></a><a class="docs-heading-anchor-permalink" href="#GNNGraph-type" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.GNNGraph" href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GraphNeuralNetworks.GNNGraphs.GNNGraph</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GNNGraph(data; [graph_type, ndata, edata, gdata, num_nodes, graph_indicator, dir])
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>GNNGraph · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li class="is-active"><a class="tocitem" href>GNNGraph</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#GNNGraph-type"><span>GNNGraph type</span></a></li><li><a class="tocitem" href="#DataStore"><span>DataStore</span></a></li><li><a class="tocitem" href="#Query"><span>Query</span></a></li><li><a class="tocitem" href="#Transform"><span>Transform</span></a></li><li><a class="tocitem" href="#Generate"><span>Generate</span></a></li><li><a class="tocitem" href="#Operators"><span>Operators</span></a></li><li><a class="tocitem" href="#Sampling"><span>Sampling</span></a></li></ul></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li><a class="tocitem" href="../conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>GNNGraph</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>GNNGraph</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/gnngraph.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="GNNGraph"><a class="docs-heading-anchor" href="#GNNGraph">GNNGraph</a><a id="GNNGraph-1"></a><a class="docs-heading-anchor-permalink" href="#GNNGraph" title="Permalink"></a></h1><p>Documentation page for the graph type <code>GNNGraph</code> provided by GraphNeuralNetworks.jl and related methods. </p><p>Besides the methods documented here, one can rely on the large set of functionalities given by <a href="https://github.com/JuliaGraphs/Graphs.jl">Graphs.jl</a> thanks to the fact that <code>GNNGraph</code> inherits from <code>Graphs.AbstractGraph</code>.</p><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#GraphNeuralNetworks.GNNGraphs.DataStore"><code>GraphNeuralNetworks.GNNGraphs.DataStore</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GraphNeuralNetworks.GNNGraphs.GNNGraph</code></a></li><li><a href="#Base.intersect"><code>Base.intersect</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}"><code>GraphNeuralNetworks.GNNGraphs.add_nodes</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.adjacency_list</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.getgraph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_isolated_nodes</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_multi_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.is_bidirected</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.khop_adj"><code>GraphNeuralNetworks.GNNGraphs.khop_adj</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}"><code>GraphNeuralNetworks.GNNGraphs.knn_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max"><code>GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.negative_sample</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.normalized_laplacian"><code>GraphNeuralNetworks.GNNGraphs.normalized_laplacian</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}"><code>GraphNeuralNetworks.GNNGraphs.radius_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.rand_edge_split</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}"><code>GraphNeuralNetworks.GNNGraphs.rand_graph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_heterograph</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.random_walk_pe</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_multi_edges</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_self_loops</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.sample_neighbors"><code>GraphNeuralNetworks.GNNGraphs.sample_neighbors</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>GraphNeuralNetworks.GNNGraphs.scaled_laplacian</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.set_edge_weight</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_bidirected</code></a></li><li><a href="#GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_unidirected</code></a></li><li><a href="#Graphs.LinAlg.adjacency_matrix"><code>Graphs.LinAlg.adjacency_matrix</code></a></li><li><a href="#Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}"><code>Graphs.degree</code></a></li><li><a href="#Graphs.has_self_loops-Tuple{GNNGraph}"><code>Graphs.has_self_loops</code></a></li><li><a href="#Graphs.inneighbors"><code>Graphs.inneighbors</code></a></li><li><a href="#Graphs.outneighbors"><code>Graphs.outneighbors</code></a></li><li><a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>MLUtils.batch</code></a></li><li><a href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>MLUtils.unbatch</code></a></li><li><a href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a></li></ul><h2 id="GNNGraph-type"><a class="docs-heading-anchor" href="#GNNGraph-type">GNNGraph type</a><a id="GNNGraph-type-1"></a><a class="docs-heading-anchor-permalink" href="#GNNGraph-type" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.GNNGraph" href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GraphNeuralNetworks.GNNGraphs.GNNGraph</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GNNGraph(data; [graph_type, ndata, edata, gdata, num_nodes, graph_indicator, dir])
 GNNGraph(g::GNNGraph; [ndata, edata, gdata])</code></pre><p>A type representing a graph structure that also stores feature arrays associated to nodes, edges, and the graph itself.</p><p>The feature arrays are stored in the fields <code>ndata</code>, <code>edata</code>, and <code>gdata</code> as <a href="#GraphNeuralNetworks.GNNGraphs.DataStore"><code>DataStore</code></a> objects offering a convenient dictionary-like  and namedtuple-like interface. The features can be passed at construction time or added later.</p><p>A <code>GNNGraph</code> can be constructed out of different <code>data</code> objects expressing the connections inside the graph. The internal representation type is determined by <code>graph_type</code>.</p><p>When constructed from another <code>GNNGraph</code>, the internal graph representation is preserved and shared. The node/edge/graph features are retained as well, unless explicitely set by the keyword arguments <code>ndata</code>, <code>edata</code>, and <code>gdata</code>.</p><p>A <code>GNNGraph</code> can also represent multiple graphs batched togheter (see <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a> or <a href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a>). The field <code>g.graph_indicator</code> contains the graph membership of each node.</p><p><code>GNNGraph</code>s are always directed graphs, therefore each edge is defined by a source node and a target node (see <a href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>edge_index</code></a>). Self loops (edges connecting a node to itself) and multiple edges (more than one edge between the same pair of nodes) are supported.</p><p>A <code>GNNGraph</code> is a Graphs.jl&#39;s <code>AbstractGraph</code>, therefore it supports most functionality from that library.</p><p><strong>Arguments</strong></p><ul><li><code>data</code>: Some data representing the graph topology. Possible type are<ul><li>An adjacency matrix</li><li>An adjacency list.</li><li>A tuple containing the source and target vectors (COO representation)</li><li>A Graphs.jl&#39; graph.</li></ul></li><li><code>graph_type</code>: A keyword argument that specifies               the underlying representation used by the GNNGraph.               Currently supported values are<ul><li><code>:coo</code>. Graph represented as a tuple <code>(source, target)</code>, such that the <code>k</code>-th edge         connects the node <code>source[k]</code> to node <code>target[k]</code>.         Optionally, also edge weights can be given: <code>(source, target, weights)</code>.</li><li><code>:sparse</code>. A sparse adjacency matrix representation.</li><li><code>:dense</code>. A dense adjacency matrix representation.</li></ul>Defaults to <code>:coo</code>, currently the most supported type.</li><li><code>dir</code>: The assumed edge direction when given adjacency matrix or adjacency list input data <code>g</code>.       Possible values are <code>:out</code> and <code>:in</code>. Default <code>:out</code>.</li><li><code>num_nodes</code>: The number of nodes. If not specified, inferred from <code>g</code>. Default <code>nothing</code>.</li><li><code>graph_indicator</code>: For batched graphs, a vector containing the graph assignment of each node. Default <code>nothing</code>.</li><li><code>ndata</code>: Node features. An array or named tuple of arrays whose last dimension has size <code>num_nodes</code>.</li><li><code>edata</code>: Edge features. An array or named tuple of arrays whose last dimension has size <code>num_edges</code>.</li><li><code>gdata</code>: Graph features. An array or named tuple of arrays whose last dimension has size <code>num_graphs</code>.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs">using Flux, GraphNeuralNetworks, CUDA
 
 # Construct from adjacency list representation
@@ -36,7 +36,7 @@
 
 # Collect edges&#39; source and target nodes.
 # Both source and target are vectors of length num_edges
-source, target = edge_index(g)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/gnngraph.jl#L8-L107">source</a></section></article><h2 id="DataStore"><a class="docs-heading-anchor" href="#DataStore">DataStore</a><a id="DataStore-1"></a><a class="docs-heading-anchor-permalink" href="#DataStore" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.DataStore" href="#GraphNeuralNetworks.GNNGraphs.DataStore"><code>GraphNeuralNetworks.GNNGraphs.DataStore</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">DataStore([n, data])
+source, target = edge_index(g)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/gnngraph.jl#L8-L107">source</a></section></article><h2 id="DataStore"><a class="docs-heading-anchor" href="#DataStore">DataStore</a><a id="DataStore-1"></a><a class="docs-heading-anchor-permalink" href="#DataStore" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.DataStore" href="#GraphNeuralNetworks.GNNGraphs.DataStore"><code>GraphNeuralNetworks.GNNGraphs.DataStore</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">DataStore([n, data])
 DataStore([n,] k1 = x1, k2 = x2, ...)</code></pre><p>A container for feature arrays. The optional argument <code>n</code> enforces that <code>numobs(x) == n</code> for each array contained in the datastore.</p><p>At construction time, the <code>data</code> can be provided as any iterables of pairs of symbols and arrays or as keyword arguments:</p><pre><code class="language-julia-repl hljs">julia&gt; ds = DataStore(3, x = rand(2, 3), y = rand(3))
 DataStore(3) with 2 elements:
   y = 3-element Vector{Float64}
@@ -78,8 +78,8 @@
 julia&gt; ds2.a
 2-element Vector{Float64}:
  1.0
- 1.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/datastore.jl#L1-L70">source</a></section></article><h2 id="Query"><a class="docs-heading-anchor" href="#Query">Query</a><a id="Query-1"></a><a class="docs-heading-anchor-permalink" href="#Query" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}" href="#GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.adjacency_list</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">adjacency_list(g; dir=:out)
-adjacency_list(g, nodes; dir=:out)</code></pre><p>Return the adjacency list representation (a vector of vectors) of the graph <code>g</code>.</p><p>Calling <code>a</code> the adjacency list, if <code>dir=:out</code> than <code>a[i]</code> will contain the neighbors of node <code>i</code> through outgoing edges. If <code>dir=:in</code>, it will contain neighbors from incoming edges instead.</p><p>If <code>nodes</code> is given, return the neighborhood of the nodes in <code>nodes</code> only.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L124-L137">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_index(g::GNNGraph)</code></pre><p>Return a tuple containing two vectors, respectively storing  the source and target nodes for each edges in <code>g</code>.</p><pre><code class="language-julia hljs">s, t = edge_index(g)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}" href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_index(g::GNNHeteroGraph, [edge_t])</code></pre><p>Return a tuple containing two vectors, respectively storing the source and target nodes for each edges in <code>g</code> of type <code>edge_t = (src_t, rel_t, trg_t)</code>.</p><p>If <code>edge_t</code> is not provided, it will error if <code>g</code> has more than one edge type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L16-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">graph_indicator(g::GNNGraph; edges=false)</code></pre><p>Return a vector containing the graph membership (an integer from <code>1</code> to <code>g.num_graphs</code>) of each node in the graph. If <code>edges=true</code>, return the graph membership of each edge instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L456-L462">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}" href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">graph_indicator(g::GNNHeteroGraph, [node_t])</code></pre><p>Return a Dict of vectors containing the graph membership (an integer from <code>1</code> to <code>g.num_graphs</code>) of each node in the graph for each node type. If <code>node_t</code> is provided, return the graph membership of each node of type <code>node_t</code> instead.</p><p>See also <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>batch</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L477-L485">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_isolated_nodes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_isolated_nodes(g::GNNGraph; dir=:out)</code></pre><p>Return true if the graph <code>g</code> contains nodes with out-degree (if <code>dir=:out</code>) or in-degree (if <code>dir=:in</code>) equal to zero.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L377-L382">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_multi_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_multi_edges(g::GNNGraph)</code></pre><p>Return <code>true</code> if <code>g</code> has any multiple edges.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L554-L558">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.is_bidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">is_bidirected(g::GNNGraph)</code></pre><p>Check if the directed graph <code>g</code> essentially corresponds to an undirected graph, i.e. if for each edge it also contains the  reverse edge. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L530-L536">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.khop_adj" href="#GraphNeuralNetworks.GNNGraphs.khop_adj"><code>GraphNeuralNetworks.GNNGraphs.khop_adj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">khop_adj(g::GNNGraph,k::Int,T::DataType=eltype(g); dir=:out, weighted=true)</code></pre><p>Return <span>$A^k$</span> where <span>$A$</span> is the adjacency matrix of the graph &#39;g&#39;.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L565-L570">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max" href="#GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max"><code>GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">laplacian_lambda_max(g::GNNGraph, T=Float32; add_self_loops=false, dir=:out)</code></pre><p>Return the largest eigenvalue of the normalized symmetric Laplacian of the graph <code>g</code>.</p><p>If the graph is batched from multiple graphs, return the list of the largest eigenvalue for each graph.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L575-L581">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.normalized_laplacian" href="#GraphNeuralNetworks.GNNGraphs.normalized_laplacian"><code>GraphNeuralNetworks.GNNGraphs.normalized_laplacian</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">normalized_laplacian(g, T=Float32; add_self_loops=false, dir=:out)</code></pre><p>Normalized Laplacian matrix of graph <code>g</code>.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A <code>GNNGraph</code>.</li><li><code>T</code>: result element type.</li><li><code>add_self_loops</code>: add self-loops while calculating the matrix.</li><li><code>dir</code>: the edge directionality considered (:out, :in, :both).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L393-L404">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.scaled_laplacian" href="#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>GraphNeuralNetworks.GNNGraphs.scaled_laplacian</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">scaled_laplacian(g, T=Float32; dir=:out)</code></pre><p>Scaled Laplacian matrix of graph <code>g</code>, defined as <span>$\hat{L} = \frac{2}{\lambda_{max}} L - I$</span> where <span>$L$</span> is the normalized Laplacian matrix.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A <code>GNNGraph</code>.</li><li><code>T</code>: result element type.</li><li><code>dir</code>: the edge directionality considered (:out, :in, :both).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L425-L436">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.LinAlg.adjacency_matrix" href="#Graphs.LinAlg.adjacency_matrix"><code>Graphs.LinAlg.adjacency_matrix</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">adjacency_matrix(g::GNNGraph, T=eltype(g); dir=:out, weighted=true)</code></pre><p>Return the adjacency matrix <code>A</code> for the graph <code>g</code>. </p><p>If <code>dir=:out</code>, <code>A[i,j] &gt; 0</code> denotes the presence of an edge from node <code>i</code> to node <code>j</code>. If <code>dir=:in</code> instead, <code>A[i,j] &gt; 0</code> denotes the presence of an edge from node <code>j</code> to node <code>i</code>.</p><p>User may specify the eltype <code>T</code> of the returned matrix. </p><p>If <code>weighted=true</code>, the <code>A</code> will contain the edge weights if any, otherwise the elements of <code>A</code> will be either 0 or 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L170-L181">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}" href="#Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}"><code>Graphs.degree</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">degree(g::GNNGraph, T=nothing; dir=:out, edge_weight=true)</code></pre><p>Return a vector containing the degrees of the nodes in <code>g</code>.</p><p>The gradient is propagated through this function only if <code>edge_weight</code> is <code>true</code> or a vector.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A graph.</li><li><code>T</code>: Element type of the returned vector. If <code>nothing</code>, is      chosen based on the graph type and will be an integer      if <code>edge_weight=false</code>. Default <code>nothing</code>.</li><li><code>dir</code>: For <code>dir=:out</code> the degree of a node is counted based on the outgoing edges.        For <code>dir=:in</code>, the ingoing edges are used. If <code>dir=:both</code> we have the sum of the two.</li><li><code>edge_weight</code>: If <code>true</code> and the graph contains weighted edges, the degree will                be weighted. Set to <code>false</code> instead to just count the number of               outgoing/ingoing edges.                Finally, you can also pass a vector of weights to be used               instead of the graph&#39;s own weights.               Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L252-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.has_self_loops-Tuple{GNNGraph}" href="#Graphs.has_self_loops-Tuple{GNNGraph}"><code>Graphs.has_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_self_loops(g::GNNGraph)</code></pre><p>Return <code>true</code> if <code>g</code> has any self loops.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/query.jl#L544-L548">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.outneighbors" href="#Graphs.outneighbors"><code>Graphs.outneighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">outneighbors(g, v)</code></pre><p>Return a list of all neighbors connected to vertex <code>v</code> by an outgoing edge.</p><p><strong>Implementation Notes</strong></p><p>Returns a reference to the current graph&#39;s internal structures, not a copy. Do not modify result. If the graph is modified, the behavior is undefined: the array behind this reference may be modified too, but this is not guaranteed.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using Graphs
+ 1.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/datastore.jl#L1-L70">source</a></section></article><h2 id="Query"><a class="docs-heading-anchor" href="#Query">Query</a><a id="Query-1"></a><a class="docs-heading-anchor-permalink" href="#Query" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}" href="#GraphNeuralNetworks.GNNGraphs.adjacency_list-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.adjacency_list</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">adjacency_list(g; dir=:out)
+adjacency_list(g, nodes; dir=:out)</code></pre><p>Return the adjacency list representation (a vector of vectors) of the graph <code>g</code>.</p><p>Calling <code>a</code> the adjacency list, if <code>dir=:out</code> than <code>a[i]</code> will contain the neighbors of node <code>i</code> through outgoing edges. If <code>dir=:in</code>, it will contain neighbors from incoming edges instead.</p><p>If <code>nodes</code> is given, return the neighborhood of the nodes in <code>nodes</code> only.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L124-L137">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_index(g::GNNGraph)</code></pre><p>Return a tuple containing two vectors, respectively storing  the source and target nodes for each edges in <code>g</code>.</p><pre><code class="language-julia hljs">s, t = edge_index(g)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}" href="#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_index</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_index(g::GNNHeteroGraph, [edge_t])</code></pre><p>Return a tuple containing two vectors, respectively storing the source and target nodes for each edges in <code>g</code> of type <code>edge_t = (src_t, rel_t, trg_t)</code>.</p><p>If <code>edge_t</code> is not provided, it will error if <code>g</code> has more than one edge type.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L16-L23">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">graph_indicator(g::GNNGraph; edges=false)</code></pre><p>Return a vector containing the graph membership (an integer from <code>1</code> to <code>g.num_graphs</code>) of each node in the graph. If <code>edges=true</code>, return the graph membership of each edge instead.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L456-L462">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}" href="#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNHeteroGraph}"><code>GraphNeuralNetworks.GNNGraphs.graph_indicator</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">graph_indicator(g::GNNHeteroGraph, [node_t])</code></pre><p>Return a Dict of vectors containing the graph membership (an integer from <code>1</code> to <code>g.num_graphs</code>) of each node in the graph for each node type. If <code>node_t</code> is provided, return the graph membership of each node of type <code>node_t</code> instead.</p><p>See also <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>batch</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L477-L485">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.has_isolated_nodes-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_isolated_nodes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_isolated_nodes(g::GNNGraph; dir=:out)</code></pre><p>Return true if the graph <code>g</code> contains nodes with out-degree (if <code>dir=:out</code>) or in-degree (if <code>dir=:in</code>) equal to zero.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L377-L382">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.has_multi_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_multi_edges(g::GNNGraph)</code></pre><p>Return <code>true</code> if <code>g</code> has any multiple edges.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L554-L558">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.is_bidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">is_bidirected(g::GNNGraph)</code></pre><p>Check if the directed graph <code>g</code> essentially corresponds to an undirected graph, i.e. if for each edge it also contains the  reverse edge. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L530-L536">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.khop_adj" href="#GraphNeuralNetworks.GNNGraphs.khop_adj"><code>GraphNeuralNetworks.GNNGraphs.khop_adj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">khop_adj(g::GNNGraph,k::Int,T::DataType=eltype(g); dir=:out, weighted=true)</code></pre><p>Return <span>$A^k$</span> where <span>$A$</span> is the adjacency matrix of the graph &#39;g&#39;.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L565-L570">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max" href="#GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max"><code>GraphNeuralNetworks.GNNGraphs.laplacian_lambda_max</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">laplacian_lambda_max(g::GNNGraph, T=Float32; add_self_loops=false, dir=:out)</code></pre><p>Return the largest eigenvalue of the normalized symmetric Laplacian of the graph <code>g</code>.</p><p>If the graph is batched from multiple graphs, return the list of the largest eigenvalue for each graph.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L575-L581">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.normalized_laplacian" href="#GraphNeuralNetworks.GNNGraphs.normalized_laplacian"><code>GraphNeuralNetworks.GNNGraphs.normalized_laplacian</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">normalized_laplacian(g, T=Float32; add_self_loops=false, dir=:out)</code></pre><p>Normalized Laplacian matrix of graph <code>g</code>.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A <code>GNNGraph</code>.</li><li><code>T</code>: result element type.</li><li><code>add_self_loops</code>: add self-loops while calculating the matrix.</li><li><code>dir</code>: the edge directionality considered (:out, :in, :both).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L393-L404">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.scaled_laplacian" href="#GraphNeuralNetworks.GNNGraphs.scaled_laplacian"><code>GraphNeuralNetworks.GNNGraphs.scaled_laplacian</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">scaled_laplacian(g, T=Float32; dir=:out)</code></pre><p>Scaled Laplacian matrix of graph <code>g</code>, defined as <span>$\hat{L} = \frac{2}{\lambda_{max}} L - I$</span> where <span>$L$</span> is the normalized Laplacian matrix.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A <code>GNNGraph</code>.</li><li><code>T</code>: result element type.</li><li><code>dir</code>: the edge directionality considered (:out, :in, :both).</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L425-L436">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.LinAlg.adjacency_matrix" href="#Graphs.LinAlg.adjacency_matrix"><code>Graphs.LinAlg.adjacency_matrix</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">adjacency_matrix(g::GNNGraph, T=eltype(g); dir=:out, weighted=true)</code></pre><p>Return the adjacency matrix <code>A</code> for the graph <code>g</code>. </p><p>If <code>dir=:out</code>, <code>A[i,j] &gt; 0</code> denotes the presence of an edge from node <code>i</code> to node <code>j</code>. If <code>dir=:in</code> instead, <code>A[i,j] &gt; 0</code> denotes the presence of an edge from node <code>j</code> to node <code>i</code>.</p><p>User may specify the eltype <code>T</code> of the returned matrix. </p><p>If <code>weighted=true</code>, the <code>A</code> will contain the edge weights if any, otherwise the elements of <code>A</code> will be either 0 or 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L170-L181">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}" href="#Graphs.degree-Union{Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}, Tuple{TT}, Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, TT}} where TT&lt;:Union{Nothing, Type{&lt;:Number}}"><code>Graphs.degree</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">degree(g::GNNGraph, T=nothing; dir=:out, edge_weight=true)</code></pre><p>Return a vector containing the degrees of the nodes in <code>g</code>.</p><p>The gradient is propagated through this function only if <code>edge_weight</code> is <code>true</code> or a vector.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A graph.</li><li><code>T</code>: Element type of the returned vector. If <code>nothing</code>, is      chosen based on the graph type and will be an integer      if <code>edge_weight=false</code>. Default <code>nothing</code>.</li><li><code>dir</code>: For <code>dir=:out</code> the degree of a node is counted based on the outgoing edges.        For <code>dir=:in</code>, the ingoing edges are used. If <code>dir=:both</code> we have the sum of the two.</li><li><code>edge_weight</code>: If <code>true</code> and the graph contains weighted edges, the degree will                be weighted. Set to <code>false</code> instead to just count the number of               outgoing/ingoing edges.                Finally, you can also pass a vector of weights to be used               instead of the graph&#39;s own weights.               Default <code>true</code>.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L252-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.has_self_loops-Tuple{GNNGraph}" href="#Graphs.has_self_loops-Tuple{GNNGraph}"><code>Graphs.has_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">has_self_loops(g::GNNGraph)</code></pre><p>Return <code>true</code> if <code>g</code> has any self loops.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/query.jl#L544-L548">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="Graphs.outneighbors" href="#Graphs.outneighbors"><code>Graphs.outneighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">outneighbors(g, v)</code></pre><p>Return a list of all neighbors connected to vertex <code>v</code> by an outgoing edge.</p><p><strong>Implementation Notes</strong></p><p>Returns a reference to the current graph&#39;s internal structures, not a copy. Do not modify result. If the graph is modified, the behavior is undefined: the array behind this reference may be modified too, but this is not guaranteed.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using Graphs
 
 julia&gt; g = SimpleDiGraph([0 1 0 0 0; 0 0 1 0 0; 1 0 0 1 0; 0 0 0 0 1; 0 0 0 1 0]);
 
@@ -106,11 +106,11 @@
 julia&gt; add_edges(g, ([2, 3], [4, 1], [10.0, 20.0]))
 GNNGraph:
   num_nodes: 4
-  num_edges: 7</code></pre><p>```jldoctest julia&gt; g = GNNGraph() GNNGraph:     num<em>nodes: 0     num</em>edges: 0</p><p>julia&gt; add<em>edges(g, [1,2], [2,3]) GNNGraph:     num</em>nodes: 3     num_edges: 2    </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L177-L216">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}" href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_edges(g::GNNHeteroGraph, edge_t, s, t; [edata, num_nodes])
+  num_edges: 7</code></pre><p>```jldoctest julia&gt; g = GNNGraph() GNNGraph:     num<em>nodes: 0     num</em>edges: 0</p><p>julia&gt; add<em>edges(g, [1,2], [2,3]) GNNGraph:     num</em>nodes: 3     num_edges: 2    </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L177-L216">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}" href="#GraphNeuralNetworks.GNNGraphs.add_edges-Tuple{GNNHeteroGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Tuple{Symbol, Symbol, Symbol}, AbstractVector, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.add_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_edges(g::GNNHeteroGraph, edge_t, s, t; [edata, num_nodes])
 add_edges(g::GNNHeteroGraph, edge_t =&gt; (s, t); [edata, num_nodes])
-add_edges(g::GNNHeteroGraph, edge_t =&gt; (s, t, w); [edata, num_nodes])</code></pre><p>Add to heterograph <code>g</code> edges of type <code>edge_t</code> with source node vector <code>s</code> and target node vector <code>t</code>. Optionally, pass the  edge weights <code>w</code> or the features  <code>edata</code> for the new edges. <code>edge_t</code> is a triplet of symbols <code>(src_t, rel_t, dst_t)</code>. </p><p>If the edge type is not already present in the graph, it is added.  If it involves new node types, they are added to the graph as well. In this case, a dictionary or named tuple of <code>num_nodes</code> can be passed to specify the number of nodes of the new types, otherwise the number of nodes is inferred from the maximum node id in <code>s</code> and <code>t</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L253-L266">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}" href="#GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}"><code>GraphNeuralNetworks.GNNGraphs.add_nodes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_nodes(g::GNNGraph, n; [ndata])</code></pre><p>Add <code>n</code> new nodes to graph <code>g</code>. In the  new graph, these nodes will have indexes from <code>g.num_nodes + 1</code> to <code>g.num_nodes + n</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L465-L471">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_self_loops(g::GNNGraph)</code></pre><p>Return a graph with the same features as <code>g</code> but also adding edges connecting the nodes to themselves.</p><p>Nodes with already existing self-loops will obtain a second self-loop.</p><p>If the graphs has edge weights, the new edges will have weight 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}" href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_self_loops(g::GNNHeteroGraph, edge_t::EType)</code></pre><p>Return a graph with the same features as <code>g</code> but also adding self-loops of the specified type, edge_t</p><p>Nodes with already existing self-loops of type edge<em>t will obtain a second self-loop of type edge</em>t.</p><p>If the graphs has edge weights for edges of type edge_t, the new edges will have weight 1.</p><p>If no edges of type edge_t exist, or all existing edges have no weight, then all new self loops will have no weight.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L41-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.getgraph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">getgraph(g::GNNGraph, i; nmap=false)</code></pre><p>Return the subgraph of <code>g</code> induced by those nodes <code>j</code> for which <code>g.graph_indicator[j] == i</code> or, if <code>i</code> is a collection, <code>g.graph_indicator[j] ∈ i</code>.  In other words, it extract the component graphs from a batched graph. </p><p>If <code>nmap=true</code>, return also a vector <code>v</code> mapping the new nodes to the old ones.  The node <code>i</code> in the subgraph will correspond to the node <code>v[i]</code> in <code>g</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L811-L821">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.negative_sample</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">negative_sample(g::GNNGraph; 
+add_edges(g::GNNHeteroGraph, edge_t =&gt; (s, t, w); [edata, num_nodes])</code></pre><p>Add to heterograph <code>g</code> edges of type <code>edge_t</code> with source node vector <code>s</code> and target node vector <code>t</code>. Optionally, pass the  edge weights <code>w</code> or the features  <code>edata</code> for the new edges. <code>edge_t</code> is a triplet of symbols <code>(src_t, rel_t, dst_t)</code>. </p><p>If the edge type is not already present in the graph, it is added.  If it involves new node types, they are added to the graph as well. In this case, a dictionary or named tuple of <code>num_nodes</code> can be passed to specify the number of nodes of the new types, otherwise the number of nodes is inferred from the maximum node id in <code>s</code> and <code>t</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L253-L266">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}" href="#GraphNeuralNetworks.GNNGraphs.add_nodes-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}, Integer}"><code>GraphNeuralNetworks.GNNGraphs.add_nodes</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_nodes(g::GNNGraph, n; [ndata])</code></pre><p>Add <code>n</code> new nodes to graph <code>g</code>. In the  new graph, these nodes will have indexes from <code>g.num_nodes + 1</code> to <code>g.num_nodes + n</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L465-L471">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_self_loops(g::GNNGraph)</code></pre><p>Return a graph with the same features as <code>g</code> but also adding edges connecting the nodes to themselves.</p><p>Nodes with already existing self-loops will obtain a second self-loop.</p><p>If the graphs has edge weights, the new edges will have weight 1.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L2-L11">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}" href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Union{Tuple{V}, Tuple{T}, Tuple{GNNHeteroGraph{Tuple{T, T, V}}, Tuple{Symbol, Symbol, Symbol}}} where {T&lt;:(AbstractVector{&lt;:Integer}), V}"><code>GraphNeuralNetworks.GNNGraphs.add_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_self_loops(g::GNNHeteroGraph, edge_t::EType)</code></pre><p>Return a graph with the same features as <code>g</code> but also adding self-loops of the specified type, edge_t</p><p>Nodes with already existing self-loops of type edge<em>t will obtain a second self-loop of type edge</em>t.</p><p>If the graphs has edge weights for edges of type edge_t, the new edges will have weight 1.</p><p>If no edges of type edge_t exist, or all existing edges have no weight, then all new self loops will have no weight.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L41-L52">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.getgraph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">getgraph(g::GNNGraph, i; nmap=false)</code></pre><p>Return the subgraph of <code>g</code> induced by those nodes <code>j</code> for which <code>g.graph_indicator[j] == i</code> or, if <code>i</code> is a collection, <code>g.graph_indicator[j] ∈ i</code>.  In other words, it extract the component graphs from a batched graph. </p><p>If <code>nmap=true</code>, return also a vector <code>v</code> mapping the new nodes to the old ones.  The node <code>i</code> in the subgraph will correspond to the node <code>v[i]</code> in <code>g</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L811-L821">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.negative_sample-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.negative_sample</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">negative_sample(g::GNNGraph; 
                 num_neg_edges = g.num_edges, 
-                bidirected = is_bidirected(g))</code></pre><p>Return a graph containing random negative edges (i.e. non-edges) from graph <code>g</code> as edges.</p><p>If <code>bidirected=true</code>, the output graph will be bidirected and there will be no leakage from the origin graph. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>is_bidirected</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L875-L886">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}" href="#GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.rand_edge_split</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rand_edge_split(g::GNNGraph, frac; bidirected=is_bidirected(g)) -&gt; g1, g2</code></pre><p>Randomly partition the edges in <code>g</code> to form two graphs, <code>g1</code> and <code>g2</code>. Both will have the same number of nodes as <code>g</code>. <code>g1</code> will contain a fraction <code>frac</code> of the original edges,  while <code>g2</code> wil contain the rest.</p><p>If <code>bidirected = true</code> makes sure that an edge and its reverse go into the same split. This option is supported only for bidirected graphs with no self-loops and multi-edges.</p><p><code>rand_edge_split</code> is tipically used to create train/test splits in link prediction tasks.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L931-L944">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.random_walk_pe</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">random_walk_pe(g, walk_length)</code></pre><p>Return the random walk positional encoding from the paper <a href="https://arxiv.org/abs/2110.07875">Graph Neural Networks with Learnable Structural and Positional Representations</a> of the given graph <code>g</code> and the length of the walk <code>walk_length</code> as a matrix of size <code>(walk_length, g.num_nodes)</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L970-L974">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_multi_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_multi_edges(g::GNNGraph; aggr=+)</code></pre><p>Remove multiple edges (also called parallel edges or repeated edges) from graph <code>g</code>. Possible edge features are aggregated according to <code>aggr</code>, that can take value  <code>+</code>,<code>min</code>, <code>max</code> or <code>mean</code>.</p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_self_loops</code></a>, <a href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>has_multi_edges</code></a>, and <a href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>to_bidirected</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L138-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_self_loops(g::GNNGraph)</code></pre><p>Return a graph constructed from <code>g</code> where self-loops (edges from a node to itself) are removed. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>add_self_loops</code></a> and <a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_multi_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L99-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}" href="#GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.set_edge_weight</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">set_edge_weight(g::GNNGraph, w::AbstractVector)</code></pre><p>Set <code>w</code> as edge weights in the returned graph. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L482-L486">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_bidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">to_bidirected(g)</code></pre><p>Adds a reverse edge for each edge in the graph, then calls  <a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_multi_edges</code></a> with <code>mean</code> aggregation to simplify the graph. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>is_bidirected</code></a>. </p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; s, t = [1, 2, 3, 3, 4], [2, 3, 4, 4, 4];
+                bidirected = is_bidirected(g))</code></pre><p>Return a graph containing random negative edges (i.e. non-edges) from graph <code>g</code> as edges.</p><p>If <code>bidirected=true</code>, the output graph will be bidirected and there will be no leakage from the origin graph. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>is_bidirected</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L875-L886">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}" href="#GraphNeuralNetworks.GNNGraphs.rand_edge_split-Tuple{GNNGraph, Any}"><code>GraphNeuralNetworks.GNNGraphs.rand_edge_split</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rand_edge_split(g::GNNGraph, frac; bidirected=is_bidirected(g)) -&gt; g1, g2</code></pre><p>Randomly partition the edges in <code>g</code> to form two graphs, <code>g1</code> and <code>g2</code>. Both will have the same number of nodes as <code>g</code>. <code>g1</code> will contain a fraction <code>frac</code> of the original edges,  while <code>g2</code> wil contain the rest.</p><p>If <code>bidirected = true</code> makes sure that an edge and its reverse go into the same split. This option is supported only for bidirected graphs with no self-loops and multi-edges.</p><p><code>rand_edge_split</code> is tipically used to create train/test splits in link prediction tasks.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L931-L944">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.random_walk_pe-Tuple{GNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.random_walk_pe</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">random_walk_pe(g, walk_length)</code></pre><p>Return the random walk positional encoding from the paper <a href="https://arxiv.org/abs/2110.07875">Graph Neural Networks with Learnable Structural and Positional Representations</a> of the given graph <code>g</code> and the length of the walk <code>walk_length</code> as a matrix of size <code>(walk_length, g.num_nodes)</code>. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L970-L974">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_multi_edges</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_multi_edges(g::GNNGraph; aggr=+)</code></pre><p>Remove multiple edges (also called parallel edges or repeated edges) from graph <code>g</code>. Possible edge features are aggregated according to <code>aggr</code>, that can take value  <code>+</code>,<code>min</code>, <code>max</code> or <code>mean</code>.</p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_self_loops</code></a>, <a href="#GraphNeuralNetworks.GNNGraphs.has_multi_edges-Tuple{GNNGraph}"><code>has_multi_edges</code></a>, and <a href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>to_bidirected</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L138-L146">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.remove_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.remove_self_loops</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_self_loops(g::GNNGraph)</code></pre><p>Return a graph constructed from <code>g</code> where self-loops (edges from a node to itself) are removed. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.add_self_loops-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>add_self_loops</code></a> and <a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_multi_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L99-L106">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}" href="#GraphNeuralNetworks.GNNGraphs.set_edge_weight-Tuple{GNNGraph, AbstractVector}"><code>GraphNeuralNetworks.GNNGraphs.set_edge_weight</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">set_edge_weight(g::GNNGraph, w::AbstractVector)</code></pre><p>Set <code>w</code> as edge weights in the returned graph. </p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L482-L486">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.to_bidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_bidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">to_bidirected(g)</code></pre><p>Adds a reverse edge for each edge in the graph, then calls  <a href="#GraphNeuralNetworks.GNNGraphs.remove_multi_edges-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>remove_multi_edges</code></a> with <code>mean</code> aggregation to simplify the graph. </p><p>See also <a href="#GraphNeuralNetworks.GNNGraphs.is_bidirected-Tuple{GNNGraph}"><code>is_bidirected</code></a>. </p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; s, t = [1, 2, 3, 3, 4], [2, 3, 4, 4, 4];
 
 julia&gt; w = [1.0, 2.0, 3.0, 4.0, 5.0];
 
@@ -151,7 +151,7 @@
  20.0
  35.0
  35.0
- 50.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L359-L413">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_unidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">to_unidirected(g::GNNGraph)</code></pre><p>Return a graph that for each multiple edge between two nodes in <code>g</code> keeps only an edge in one direction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L430-L435">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}" href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>MLUtils.batch</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">batch(gs::Vector{&lt;:GNNGraph})</code></pre><p>Batch together multiple <code>GNNGraph</code>s into a single one  containing the total number of original nodes and edges.</p><p>Equivalent to <a href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a>. See also <a href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>Flux.unbatch</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g1 = rand_graph(4, 6, ndata=ones(8, 4))
+ 50.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L359-L413">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}" href="#GraphNeuralNetworks.GNNGraphs.to_unidirected-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>GraphNeuralNetworks.GNNGraphs.to_unidirected</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">to_unidirected(g::GNNGraph)</code></pre><p>Return a graph that for each multiple edge between two nodes in <code>g</code> keeps only an edge in one direction.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L430-L435">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}" href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>MLUtils.batch</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">batch(gs::Vector{&lt;:GNNGraph})</code></pre><p>Batch together multiple <code>GNNGraph</code>s into a single one  containing the total number of original nodes and edges.</p><p>Equivalent to <a href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a>. See also <a href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>Flux.unbatch</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g1 = rand_graph(4, 6, ndata=ones(8, 4))
 GNNGraph:
     num_nodes = 4
     num_edges = 6
@@ -182,7 +182,7 @@
  1.0  1.0  1.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
  1.0  1.0  1.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
  1.0  1.0  1.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
- 1.0  1.0  1.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L548-L593">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})" href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>MLUtils.unbatch</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">unbatch(g::GNNGraph)</code></pre><p>Opposite of the <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a> operation, returns  an array of the individual graphs batched together in <code>g</code>.</p><p>See also <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a> and <a href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>getgraph</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; gbatched = Flux.batch([rand_graph(5, 6), rand_graph(10, 8), rand_graph(4,2)])
+ 1.0  1.0  1.0  1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L548-L593">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})" href="#MLUtils.unbatch-Union{Tuple{GNNGraph{T}}, Tuple{T}} where T&lt;:(Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V})"><code>MLUtils.unbatch</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">unbatch(g::GNNGraph)</code></pre><p>Opposite of the <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a> operation, returns  an array of the individual graphs batched together in <code>g</code>.</p><p>See also <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a> and <a href="#GraphNeuralNetworks.GNNGraphs.getgraph-Tuple{GNNGraph, Int64}"><code>getgraph</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; gbatched = Flux.batch([rand_graph(5, 6), rand_graph(10, 8), rand_graph(4,2)])
 GNNGraph:
     num_nodes = 19
     num_edges = 16
@@ -200,7 +200,7 @@
 
  GNNGraph:
     num_nodes = 4
-    num_edges = 2</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L706-L737">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}" href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">blockdiag(xs::GNNGraph...)</code></pre><p>Equivalent to <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/transform.jl#L535-L539">source</a></section></article><h2 id="Generate"><a class="docs-heading-anchor" href="#Generate">Generate</a><a id="Generate-1"></a><a class="docs-heading-anchor-permalink" href="#Generate" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}" href="#GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}"><code>GraphNeuralNetworks.GNNGraphs.knn_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">knn_graph(points::AbstractMatrix, 
+    num_edges = 2</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L706-L737">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}" href="#SparseArrays.blockdiag-Tuple{GNNGraph, Vararg{GNNGraph}}"><code>SparseArrays.blockdiag</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">blockdiag(xs::GNNGraph...)</code></pre><p>Equivalent to <a href="#MLUtils.batch-Tuple{AbstractVector{&lt;:GNNGraph}}"><code>Flux.batch</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/transform.jl#L535-L539">source</a></section></article><h2 id="Generate"><a class="docs-heading-anchor" href="#Generate">Generate</a><a id="Generate-1"></a><a class="docs-heading-anchor-permalink" href="#Generate" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}" href="#GraphNeuralNetworks.GNNGraphs.knn_graph-Tuple{AbstractMatrix, Int64}"><code>GraphNeuralNetworks.GNNGraphs.knn_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">knn_graph(points::AbstractMatrix, 
           k::Int; 
           graph_indicator = nothing,
           self_loops = false, 
@@ -221,7 +221,7 @@
     num_nodes = 10
     num_edges = 30
     num_graphs = 2
-</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L147-L192">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}" href="#GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}"><code>GraphNeuralNetworks.GNNGraphs.radius_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">radius_graph(points::AbstractMatrix, 
+</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L147-L192">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}" href="#GraphNeuralNetworks.GNNGraphs.radius_graph-Tuple{AbstractMatrix, AbstractFloat}"><code>GraphNeuralNetworks.GNNGraphs.radius_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">radius_graph(points::AbstractMatrix, 
              r::AbstractFloat; 
              graph_indicator = nothing,
              self_loops = false, 
@@ -242,9 +242,9 @@
     num_nodes = 10
     num_edges = 20
     num_graphs = 2
-</code></pre><p><strong>References</strong></p><p>Section B paragraphs 1 and 2 of the paper <a href="https://arxiv.org/pdf/2101.00414.pdf">Dynamic Hidden-Variable Network Models</a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L228-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph" href="#GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_bipartite_heterograph(n1, n2, m; [bidirected, seed, node_t, edge_t, kws...])
+</code></pre><p><strong>References</strong></p><p>Section B paragraphs 1 and 2 of the paper <a href="https://arxiv.org/pdf/2101.00414.pdf">Dynamic Hidden-Variable Network Models</a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L228-L275">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph" href="#GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_bipartite_heterograph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_bipartite_heterograph(n1, n2, m; [bidirected, seed, node_t, edge_t, kws...])
 rand_bipartite_heterograph((n1, n2), m; ...)
-rand_bipartite_heterograph((n1, n2), (m1, m2); ...)</code></pre><p>Construct an <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> with number of nodes and edges specified by <code>n1</code>, <code>n2</code> and <code>m1</code> and <code>m2</code> respectively.</p><p>See <a href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>rand_heterograph</code></a> for a more general version.</p><p><strong>Keyword arguments</strong></p><ul><li><code>bidirected</code>: whether to generate a bidirected graph. Default is <code>true</code>.</li><li><code>seed</code>: random seed. Default is <code>-1</code> (no seed).</li><li><code>node_t</code>: node types. If <code>bipartite=true</code>, this should be a tuple of two node types, otherwise it should be a single node type.</li><li><code>edge_t</code>: edge types. If <code>bipartite=true</code>, this should be a tuple of two edge types, otherwise it should be a single edge type.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L114-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}" href="#GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}"><code>GraphNeuralNetworks.GNNGraphs.rand_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rand_graph(n, m; bidirected=true, seed=-1, edge_weight = nothing, kws...)</code></pre><p>Generate a random (Erdós-Renyi) <code>GNNGraph</code> with <code>n</code> nodes and <code>m</code> edges.</p><p>If <code>bidirected=true</code> the reverse edge of each edge will be present. If <code>bidirected=false</code> instead, <code>m</code> unrelated edges are generated. In any case, the output graph will contain no self-loops or multi-edges.</p><p>A vector can be passed  as <code>edge_weight</code>. Its length has to be equal to <code>m</code> in the directed case, and <code>m÷2</code> in the bidirected one.</p><p>Use a <code>seed &gt; 0</code> for reproducibility.</p><p>Additional keyword arguments will be passed to the <a href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a> constructor.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g = rand_graph(5, 4, bidirected=false)
+rand_bipartite_heterograph((n1, n2), (m1, m2); ...)</code></pre><p>Construct an <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> with number of nodes and edges specified by <code>n1</code>, <code>n2</code> and <code>m1</code> and <code>m2</code> respectively.</p><p>See <a href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>rand_heterograph</code></a> for a more general version.</p><p><strong>Keyword arguments</strong></p><ul><li><code>bidirected</code>: whether to generate a bidirected graph. Default is <code>true</code>.</li><li><code>seed</code>: random seed. Default is <code>-1</code> (no seed).</li><li><code>node_t</code>: node types. If <code>bipartite=true</code>, this should be a tuple of two node types, otherwise it should be a single node type.</li><li><code>edge_t</code>: edge types. If <code>bipartite=true</code>, this should be a tuple of two edge types, otherwise it should be a single edge type.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L114-L130">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}" href="#GraphNeuralNetworks.GNNGraphs.rand_graph-Tuple{Integer, Integer}"><code>GraphNeuralNetworks.GNNGraphs.rand_graph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">rand_graph(n, m; bidirected=true, seed=-1, edge_weight = nothing, kws...)</code></pre><p>Generate a random (Erdós-Renyi) <code>GNNGraph</code> with <code>n</code> nodes and <code>m</code> edges.</p><p>If <code>bidirected=true</code> the reverse edge of each edge will be present. If <code>bidirected=false</code> instead, <code>m</code> unrelated edges are generated. In any case, the output graph will contain no self-loops or multi-edges.</p><p>A vector can be passed  as <code>edge_weight</code>. Its length has to be equal to <code>m</code> in the directed case, and <code>m÷2</code> in the bidirected one.</p><p>Use a <code>seed &gt; 0</code> for reproducibility.</p><p>Additional keyword arguments will be passed to the <a href="#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a> constructor.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g = rand_graph(5, 4, bidirected=false)
 GNNGraph:
     num_nodes = 5
     num_edges = 4
@@ -263,11 +263,11 @@
 # Each edge has a reverse
 julia&gt; edge_index(g)
 ([1, 3, 3, 4], [3, 4, 1, 3])
-</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L1-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_heterograph" href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_heterograph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_heterograph(n, m; seed=-1, bidirected=false, kws...)</code></pre><p>Construct an <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> with number of nodes and edges  specified by <code>n</code> and <code>m</code> respectively. <code>n</code> and <code>m</code> can be any iterable of pairs specifing node/edge types and their numbers.</p><p>Use a <code>seed &gt; 0</code> for reproducibility.</p><p>Setting <code>bidirected=true</code> will generate a bidirected graph, i.e. each edge will have a reverse edge. Therefore, for each edge type <code>(:A, :rel, :B)</code> a corresponding reverse edge type <code>(:B, :rel, :A)</code> will be generated.</p><p>Additional keyword arguments will be passed to the <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> constructor.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g = rand_heterograph((:user =&gt; 10, :movie =&gt; 20),
+</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L1-L41">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_heterograph" href="#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>GraphNeuralNetworks.GNNGraphs.rand_heterograph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_heterograph(n, m; seed=-1, bidirected=false, kws...)</code></pre><p>Construct an <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> with number of nodes and edges  specified by <code>n</code> and <code>m</code> respectively. <code>n</code> and <code>m</code> can be any iterable of pairs specifing node/edge types and their numbers.</p><p>Use a <code>seed &gt; 0</code> for reproducibility.</p><p>Setting <code>bidirected=true</code> will generate a bidirected graph, i.e. each edge will have a reverse edge. Therefore, for each edge type <code>(:A, :rel, :B)</code> a corresponding reverse edge type <code>(:B, :rel, :A)</code> will be generated.</p><p>Additional keyword arguments will be passed to the <a href="../heterograph/#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a> constructor.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g = rand_heterograph((:user =&gt; 10, :movie =&gt; 20),
                             (:user, :rate, :movie) =&gt; 30)
 GNNHeteroGraph:
   num_nodes: (:user =&gt; 10, :movie =&gt; 20)         
-  num_edges: ((:user, :rate, :movie) =&gt; 30,)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L50-L74">source</a></section></article><h2 id="Operators"><a class="docs-heading-anchor" href="#Operators">Operators</a><a id="Operators-1"></a><a class="docs-heading-anchor-permalink" href="#Operators" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="Base.intersect" href="#Base.intersect"><code>Base.intersect</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">intersect(g, h)</code></pre><p>Return a graph with edges that are only in both graph <code>g</code> and graph <code>h</code>.</p><p><strong>Implementation Notes</strong></p><p>This function may produce a graph with 0-degree vertices. Preserves the eltype of the input graph.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using Graphs
+  num_edges: ((:user, :rate, :movie) =&gt; 30,)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L50-L74">source</a></section></article><h2 id="Operators"><a class="docs-heading-anchor" href="#Operators">Operators</a><a id="Operators-1"></a><a class="docs-heading-anchor-permalink" href="#Operators" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="Base.intersect" href="#Base.intersect"><code>Base.intersect</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">intersect(g, h)</code></pre><p>Return a graph with edges that are only in both graph <code>g</code> and graph <code>h</code>.</p><p><strong>Implementation Notes</strong></p><p>This function may produce a graph with 0-degree vertices. Preserves the eltype of the input graph.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using Graphs
 
 julia&gt; g1 = SimpleDiGraph([0 1 0 0 0; 0 0 1 0 0; 1 0 0 1 0; 0 0 0 0 1; 0 0 0 1 0]);
 
@@ -315,4 +315,4 @@
     num_nodes = 20
     num_edges = 10
     edata:
-        EID =&gt; (10,)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/sampling.jl#L1-L67">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tutorials/">« Tutorials</a><a class="docs-footer-nextpage" href="../basic/">Basic Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+        EID =&gt; (10,)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/sampling.jl#L1-L67">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../../tutorials/">« Tutorials</a><a class="docs-footer-nextpage" href="../basic/">Basic Layers »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/heterograph/index.html b/dev/api/heterograph/index.html
index 7f106649e..c95214e8b 100644
--- a/dev/api/heterograph/index.html
+++ b/dev/api/heterograph/index.html
@@ -40,7 +40,7 @@
 julia&gt; hg.ndata[:A].x
 2×10 Matrix{Float64}:
     0.825882  0.0797502  0.245813  0.142281  0.231253  0.685025  0.821457  0.888838  0.571347   0.53165
-    0.631286  0.316292   0.705325  0.239211  0.533007  0.249233  0.473736  0.595475  0.0623298  0.159307</code></pre><p>See also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a> for a homogeneous graph type and <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>rand_heterograph</code></a> for a function to generate random heterographs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/gnnheterograph.jl#L7-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_type_subgraph-Tuple{GNNHeteroGraph, Tuple{Symbol, Symbol, Symbol}}" href="#GraphNeuralNetworks.GNNGraphs.edge_type_subgraph-Tuple{GNNHeteroGraph, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_type_subgraph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_type_subgraph(g::GNNHeteroGraph, edge_ts)</code></pre><p>Return a subgraph of <code>g</code> that contains only the edges of type <code>edge_ts</code>. Edge types can be specified as a single edge type (i.e. a tuple containing 3 symbols) or a vector of edge types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/gnnheterograph.jl#L246-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.num_edge_types-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.num_edge_types-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.num_edge_types</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">num_edge_types(g)</code></pre><p>Return the number of edge types in the graph. For <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a>s, this is always 1. For <a href="#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a>s, this is the number of unique edge types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/gnnheterograph.jl#L226-L231">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.num_node_types-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.num_node_types-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.num_node_types</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">num_node_types(g)</code></pre><p>Return the number of node types in the graph. For <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a>s, this is always 1. For <a href="#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a>s, this is the number of unique node types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/gnnheterograph.jl#L236-L241">source</a></section></article><h2 id="Heterogeneous-Graph-Convolutions"><a class="docs-heading-anchor" href="#Heterogeneous-Graph-Convolutions">Heterogeneous Graph Convolutions</a><a id="Heterogeneous-Graph-Convolutions-1"></a><a class="docs-heading-anchor-permalink" href="#Heterogeneous-Graph-Convolutions" title="Permalink"></a></h2><p>Heterogeneous graph convolutions are implemented in the type <a href="#GraphNeuralNetworks.HeteroGraphConv"><code>HeteroGraphConv</code></a>. <code>HeteroGraphConv</code> relies on standard graph convolutional layers to perform message passing on the different relations. See the table at <a href="https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/api/conv/">this page</a> for the supported layers.</p><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.HeteroGraphConv" href="#GraphNeuralNetworks.HeteroGraphConv"><code>GraphNeuralNetworks.HeteroGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">HeteroGraphConv(itr; aggr = +)
+    0.631286  0.316292   0.705325  0.239211  0.533007  0.249233  0.473736  0.595475  0.0623298  0.159307</code></pre><p>See also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a> for a homogeneous graph type and <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.rand_heterograph"><code>rand_heterograph</code></a> for a function to generate random heterographs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/gnnheterograph.jl#L7-L84">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.edge_type_subgraph-Tuple{GNNHeteroGraph, Tuple{Symbol, Symbol, Symbol}}" href="#GraphNeuralNetworks.GNNGraphs.edge_type_subgraph-Tuple{GNNHeteroGraph, Tuple{Symbol, Symbol, Symbol}}"><code>GraphNeuralNetworks.GNNGraphs.edge_type_subgraph</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">edge_type_subgraph(g::GNNHeteroGraph, edge_ts)</code></pre><p>Return a subgraph of <code>g</code> that contains only the edges of type <code>edge_ts</code>. Edge types can be specified as a single edge type (i.e. a tuple containing 3 symbols) or a vector of edge types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/gnnheterograph.jl#L246-L251">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.num_edge_types-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.num_edge_types-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.num_edge_types</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">num_edge_types(g)</code></pre><p>Return the number of edge types in the graph. For <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a>s, this is always 1. For <a href="#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a>s, this is the number of unique edge types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/gnnheterograph.jl#L226-L231">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.num_node_types-Tuple{GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.num_node_types-Tuple{GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.num_node_types</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">num_node_types(g)</code></pre><p>Return the number of node types in the graph. For <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.GNNGraph"><code>GNNGraph</code></a>s, this is always 1. For <a href="#GraphNeuralNetworks.GNNGraphs.GNNHeteroGraph"><code>GNNHeteroGraph</code></a>s, this is the number of unique node types.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/gnnheterograph.jl#L236-L241">source</a></section></article><h2 id="Heterogeneous-Graph-Convolutions"><a class="docs-heading-anchor" href="#Heterogeneous-Graph-Convolutions">Heterogeneous Graph Convolutions</a><a id="Heterogeneous-Graph-Convolutions-1"></a><a class="docs-heading-anchor-permalink" href="#Heterogeneous-Graph-Convolutions" title="Permalink"></a></h2><p>Heterogeneous graph convolutions are implemented in the type <a href="#GraphNeuralNetworks.HeteroGraphConv"><code>HeteroGraphConv</code></a>. <code>HeteroGraphConv</code> relies on standard graph convolutional layers to perform message passing on the different relations. See the table at <a href="https://carlolucibello.github.io/GraphNeuralNetworks.jl/dev/api/conv/">this page</a> for the supported layers.</p><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.HeteroGraphConv" href="#GraphNeuralNetworks.HeteroGraphConv"><code>GraphNeuralNetworks.HeteroGraphConv</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">HeteroGraphConv(itr; aggr = +)
 HeteroGraphConv(pairs...; aggr = +)</code></pre><p>A convolutional layer for heterogeneous graphs.</p><p>The <code>itr</code> argument is an iterator of <code>pairs</code> of the form <code>edge_t =&gt; layer</code>, where <code>edge_t</code> is a 3-tuple of the form <code>(src_node_type, edge_type, dst_node_type)</code>, and <code>layer</code> is a  convolutional layers for homogeneous graphs. </p><p>Each convolution is applied to the corresponding relation.  Since a node type can be involved in multiple relations, the single convolution outputs  have to be aggregated using the <code>aggr</code> function. The default is to sum the outputs.</p><p><strong>Forward Arguments</strong></p><ul><li><code>g::GNNHeteroGraph</code>: The input graph.</li><li><code>x::Union{NamedTuple,Dict}</code>: The input node features. The keys are node types and the values are node feature tensors.</li></ul><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; g = rand_bipartite_heterograph((10, 15), 20)
 GNNHeteroGraph:
   num_nodes: Dict(:A =&gt; 10, :B =&gt; 15)
@@ -54,4 +54,4 @@
 julia&gt; y = layer(g, x); # output is a named tuple
 
 julia&gt; size(y.A) == (32, 10) &amp;&amp; size(y.B) == (32, 15)
-true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/heteroconv.jl#L1-L39">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../messagepassing/">« Message Passing</a><a class="docs-footer-nextpage" href="../temporalgraph/">Temporal Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+true</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/heteroconv.jl#L1-L39">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../messagepassing/">« Message Passing</a><a class="docs-footer-nextpage" href="../temporalgraph/">Temporal Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/messagepassing/index.html b/dev/api/messagepassing/index.html
index d41911e53..1663c64cc 100644
--- a/dev/api/messagepassing/index.html
+++ b/dev/api/messagepassing/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Message Passing · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li><a class="tocitem" href="../conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li class="is-active"><a class="tocitem" href>Message Passing</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#Interface"><span>Interface</span></a></li><li><a class="tocitem" href="#Built-in-message-functions"><span>Built-in message functions</span></a></li></ul></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>Message Passing</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Message Passing</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/messagepassing.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Message-Passing"><a class="docs-heading-anchor" href="#Message-Passing">Message Passing</a><a id="Message-Passing-1"></a><a class="docs-heading-anchor-permalink" href="#Message-Passing" title="Permalink"></a></h1><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#GraphNeuralNetworks.aggregate_neighbors"><code>GraphNeuralNetworks.aggregate_neighbors</code></a></li><li><a href="#GraphNeuralNetworks.apply_edges"><code>GraphNeuralNetworks.apply_edges</code></a></li><li><a href="#GraphNeuralNetworks.copy_xi"><code>GraphNeuralNetworks.copy_xi</code></a></li><li><a href="#GraphNeuralNetworks.copy_xj"><code>GraphNeuralNetworks.copy_xj</code></a></li><li><a href="#GraphNeuralNetworks.e_mul_xj"><code>GraphNeuralNetworks.e_mul_xj</code></a></li><li><a href="#GraphNeuralNetworks.propagate"><code>GraphNeuralNetworks.propagate</code></a></li><li><a href="#GraphNeuralNetworks.w_mul_xj"><code>GraphNeuralNetworks.w_mul_xj</code></a></li><li><a href="#GraphNeuralNetworks.xi_dot_xj"><code>GraphNeuralNetworks.xi_dot_xj</code></a></li><li><a href="#GraphNeuralNetworks.xi_sub_xj"><code>GraphNeuralNetworks.xi_sub_xj</code></a></li><li><a href="#GraphNeuralNetworks.xj_sub_xi"><code>GraphNeuralNetworks.xj_sub_xi</code></a></li></ul><h2 id="Interface"><a class="docs-heading-anchor" href="#Interface">Interface</a><a id="Interface-1"></a><a class="docs-heading-anchor-permalink" href="#Interface" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.apply_edges" href="#GraphNeuralNetworks.apply_edges"><code>GraphNeuralNetworks.apply_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">apply_edges(fmsg, g, [layer]; [xi, xj, e])
-apply_edges(fmsg, g, [layer,] xi, xj, e=nothing)</code></pre><p>Returns the message from node <code>j</code> to node <code>i</code> applying the message function <code>fmsg</code> on the edges in graph <code>g</code>. In the message-passing scheme, the incoming messages  from the neighborhood of <code>i</code> will later be aggregated in order to update the features of node <code>i</code> (see <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>).</p><p>The function <code>fmsg</code> operates on batches of edges, therefore <code>xi</code>, <code>xj</code>, and <code>e</code> are tensors whose last dimension is the batch size, or can be named tuples of  such tensors.</p><p>If also a <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a> <code>layer</code> is provided, it will be passed to <code>fmsg</code>  as a first argument.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: An <code>AbstractGNNGraph</code>.</li><li><code>xi</code>: An array or a named tuple containing arrays whose last dimension&#39;s size        is <code>g.num_nodes</code>. It will be appropriately materialized on the       target node of each edge (see also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>edge_index</code></a>).</li><li><code>xj</code>: As <code>xi</code>, but now to be materialized on each edge&#39;s source node. </li><li><code>e</code>: An array or a named tuple containing arrays whose last dimension&#39;s size is <code>g.num_edges</code>.</li><li><code>fmsg</code>: A function that takes as inputs the edge-materialized <code>xi</code>, <code>xj</code>, and <code>e</code>.      These are arrays (or named tuples of arrays) whose last dimension&#39; size is the size of      a batch of edges. The output of <code>f</code> has to be an array (or a named tuple of arrays)      with the same batch size. If also <code>layer</code> is passed to propagate,     the signature of <code>fmsg</code> has to be <code>fmsg(layer, xi, xj, e)</code>      instead of <code>fmsg(xi, xj, e)</code>.</li><li><code>layer</code>: A <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a>. If provided it will be passed to <code>fmsg</code> as a first argument.</li></ul><p>See also <a href="#GraphNeuralNetworks.propagate"><code>propagate</code></a> and <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L100-L135">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.aggregate_neighbors" href="#GraphNeuralNetworks.aggregate_neighbors"><code>GraphNeuralNetworks.aggregate_neighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">aggregate_neighbors(g, aggr, m)</code></pre><p>Given a graph <code>g</code>, edge features <code>m</code>, and an aggregation operator <code>aggr</code> (e.g <code>+, min, max, mean</code>), returns the new node features </p><p class="math-container">\[\mathbf{x}_i = \square_{j \in \mathcal{N}(i)} \mathbf{m}_{j\to i}\]</p><p>Neighborhood aggregation is the second step of <a href="#GraphNeuralNetworks.propagate"><code>propagate</code></a>,  where it comes after <a href="#GraphNeuralNetworks.apply_edges"><code>apply_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L166-L178">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.propagate" href="#GraphNeuralNetworks.propagate"><code>GraphNeuralNetworks.propagate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">propagate(fmsg, g, aggr [layer]; [xi, xj, e])
+apply_edges(fmsg, g, [layer,] xi, xj, e=nothing)</code></pre><p>Returns the message from node <code>j</code> to node <code>i</code> applying the message function <code>fmsg</code> on the edges in graph <code>g</code>. In the message-passing scheme, the incoming messages  from the neighborhood of <code>i</code> will later be aggregated in order to update the features of node <code>i</code> (see <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>).</p><p>The function <code>fmsg</code> operates on batches of edges, therefore <code>xi</code>, <code>xj</code>, and <code>e</code> are tensors whose last dimension is the batch size, or can be named tuples of  such tensors.</p><p>If also a <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a> <code>layer</code> is provided, it will be passed to <code>fmsg</code>  as a first argument.</p><p><strong>Arguments</strong></p><ul><li><code>g</code>: An <code>AbstractGNNGraph</code>.</li><li><code>xi</code>: An array or a named tuple containing arrays whose last dimension&#39;s size        is <code>g.num_nodes</code>. It will be appropriately materialized on the       target node of each edge (see also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>edge_index</code></a>).</li><li><code>xj</code>: As <code>xi</code>, but now to be materialized on each edge&#39;s source node. </li><li><code>e</code>: An array or a named tuple containing arrays whose last dimension&#39;s size is <code>g.num_edges</code>.</li><li><code>fmsg</code>: A function that takes as inputs the edge-materialized <code>xi</code>, <code>xj</code>, and <code>e</code>.      These are arrays (or named tuples of arrays) whose last dimension&#39; size is the size of      a batch of edges. The output of <code>f</code> has to be an array (or a named tuple of arrays)      with the same batch size. If also <code>layer</code> is passed to propagate,     the signature of <code>fmsg</code> has to be <code>fmsg(layer, xi, xj, e)</code>      instead of <code>fmsg(xi, xj, e)</code>.</li><li><code>layer</code>: A <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a>. If provided it will be passed to <code>fmsg</code> as a first argument.</li></ul><p>See also <a href="#GraphNeuralNetworks.propagate"><code>propagate</code></a> and <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L100-L135">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.aggregate_neighbors" href="#GraphNeuralNetworks.aggregate_neighbors"><code>GraphNeuralNetworks.aggregate_neighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">aggregate_neighbors(g, aggr, m)</code></pre><p>Given a graph <code>g</code>, edge features <code>m</code>, and an aggregation operator <code>aggr</code> (e.g <code>+, min, max, mean</code>), returns the new node features </p><p class="math-container">\[\mathbf{x}_i = \square_{j \in \mathcal{N}(i)} \mathbf{m}_{j\to i}\]</p><p>Neighborhood aggregation is the second step of <a href="#GraphNeuralNetworks.propagate"><code>propagate</code></a>,  where it comes after <a href="#GraphNeuralNetworks.apply_edges"><code>apply_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L166-L178">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.propagate" href="#GraphNeuralNetworks.propagate"><code>GraphNeuralNetworks.propagate</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">propagate(fmsg, g, aggr [layer]; [xi, xj, e])
 propagate(fmsg, g, aggr, [layer,] xi, xj, e=nothing)</code></pre><p>Performs message passing on graph <code>g</code>. Takes care of materializing the node features on each edge,  applying the message function <code>fmsg</code>, and returning an aggregated message <span>$\bar{\mathbf{m}}$</span>  (depending on the return value of <code>fmsg</code>, an array or a named tuple of  arrays with last dimension&#39;s size <code>g.num_nodes</code>).</p><p>If also a <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a> <code>layer</code> is provided, it will be passed to <code>fmsg</code>  as a first argument.</p><p>It can be decomposed in two steps:</p><pre><code class="language-julia hljs">m = apply_edges(fmsg, g, xi, xj, e)
 m̄ = aggregate_neighbors(g, aggr, m)</code></pre><p>GNN layers typically call <code>propagate</code> in their forward pass, providing as input <code>f</code> a closure.  </p><p><strong>Arguments</strong></p><ul><li><code>g</code>: A <code>GNNGraph</code>.</li><li><code>xi</code>: An array or a named tuple containing arrays whose last dimension&#39;s size        is <code>g.num_nodes</code>. It will be appropriately materialized on the       target node of each edge (see also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.edge_index-Tuple{GNNGraph{&lt;:Tuple{T, T, V} where {T&lt;:(AbstractVector{&lt;:Integer}), V}}}"><code>edge_index</code></a>).</li><li><code>xj</code>: As <code>xj</code>, but to be materialized on edges&#39; sources. </li><li><code>e</code>: An array or a named tuple containing arrays whose last dimension&#39;s size is <code>g.num_edges</code>.</li><li><code>fmsg</code>: A generic function that will be passed over to <a href="#GraphNeuralNetworks.apply_edges"><code>apply_edges</code></a>.      Has to take as inputs the edge-materialized <code>xi</code>, <code>xj</code>, and <code>e</code>      (arrays or named tuples of arrays whose last dimension&#39; size is the size of      a batch of edges). Its output has to be an array or a named tuple of arrays     with the same batch size. If also <code>layer</code> is passed to propagate,     the signature of <code>fmsg</code> has to be <code>fmsg(layer, xi, xj, e)</code>      instead of <code>fmsg(xi, xj, e)</code>.</li><li><code>layer</code>: A <a href="../basic/#GraphNeuralNetworks.GNNLayer"><code>GNNLayer</code></a>. If provided it will be passed to <code>fmsg</code> as a first argument.</li><li><code>aggr</code>: Neighborhood aggregation operator. Use <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>. </li></ul><p><strong>Examples</strong></p><pre><code class="language-julia hljs">using GraphNeuralNetworks, Flux
 
@@ -26,4 +26,4 @@
 end
 
 l = GNNConv(10 =&gt; 20)
-l(g, x)</code></pre><p>See also <a href="#GraphNeuralNetworks.apply_edges"><code>apply_edges</code></a> and <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L1-L73">source</a></section></article><h2 id="Built-in-message-functions"><a class="docs-heading-anchor" href="#Built-in-message-functions">Built-in message functions</a><a id="Built-in-message-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Built-in-message-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.copy_xi" href="#GraphNeuralNetworks.copy_xi"><code>GraphNeuralNetworks.copy_xi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">copy_xi(xi, xj, e) = xi</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L198-L200">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.copy_xj" href="#GraphNeuralNetworks.copy_xj"><code>GraphNeuralNetworks.copy_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">copy_xj(xi, xj, e) = xj</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L193-L195">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xi_dot_xj" href="#GraphNeuralNetworks.xi_dot_xj"><code>GraphNeuralNetworks.xi_dot_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xi_dot_xj(xi, xj, e) = sum(xi .* xj, dims=1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L203-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xi_sub_xj" href="#GraphNeuralNetworks.xi_sub_xj"><code>GraphNeuralNetworks.xi_sub_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xi_sub_xj(xi, xj, e) = xi .- xj</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L208-L210">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xj_sub_xi" href="#GraphNeuralNetworks.xj_sub_xi"><code>GraphNeuralNetworks.xj_sub_xi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xj_sub_xi(xi, xj, e) = xj .- xi</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L213-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.e_mul_xj" href="#GraphNeuralNetworks.e_mul_xj"><code>GraphNeuralNetworks.e_mul_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">e_mul_xj(xi, xj, e) = reshape(e, (...)) .* xj</code></pre><p>Reshape <code>e</code> into broadcast compatible shape with <code>xj</code> (by prepending singleton dimensions) then perform broadcasted multiplication.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L218-L224">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.w_mul_xj" href="#GraphNeuralNetworks.w_mul_xj"><code>GraphNeuralNetworks.w_mul_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">w_mul_xj(xi, xj, w) = reshape(w, (...)) .* xj</code></pre><p>Similar to <a href="#GraphNeuralNetworks.e_mul_xj"><code>e_mul_xj</code></a> but specialized on scalar edge features (weights).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/msgpass.jl#L232-L236">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../pool/">« Pooling Layers</a><a class="docs-footer-nextpage" href="../heterograph/">Heterogeneous Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+l(g, x)</code></pre><p>See also <a href="#GraphNeuralNetworks.apply_edges"><code>apply_edges</code></a> and <a href="#GraphNeuralNetworks.aggregate_neighbors"><code>aggregate_neighbors</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L1-L73">source</a></section></article><h2 id="Built-in-message-functions"><a class="docs-heading-anchor" href="#Built-in-message-functions">Built-in message functions</a><a id="Built-in-message-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Built-in-message-functions" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.copy_xi" href="#GraphNeuralNetworks.copy_xi"><code>GraphNeuralNetworks.copy_xi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">copy_xi(xi, xj, e) = xi</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L198-L200">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.copy_xj" href="#GraphNeuralNetworks.copy_xj"><code>GraphNeuralNetworks.copy_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">copy_xj(xi, xj, e) = xj</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L193-L195">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xi_dot_xj" href="#GraphNeuralNetworks.xi_dot_xj"><code>GraphNeuralNetworks.xi_dot_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xi_dot_xj(xi, xj, e) = sum(xi .* xj, dims=1)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L203-L205">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xi_sub_xj" href="#GraphNeuralNetworks.xi_sub_xj"><code>GraphNeuralNetworks.xi_sub_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xi_sub_xj(xi, xj, e) = xi .- xj</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L208-L210">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.xj_sub_xi" href="#GraphNeuralNetworks.xj_sub_xi"><code>GraphNeuralNetworks.xj_sub_xi</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">xj_sub_xi(xi, xj, e) = xj .- xi</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L213-L215">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.e_mul_xj" href="#GraphNeuralNetworks.e_mul_xj"><code>GraphNeuralNetworks.e_mul_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">e_mul_xj(xi, xj, e) = reshape(e, (...)) .* xj</code></pre><p>Reshape <code>e</code> into broadcast compatible shape with <code>xj</code> (by prepending singleton dimensions) then perform broadcasted multiplication.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L218-L224">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.w_mul_xj" href="#GraphNeuralNetworks.w_mul_xj"><code>GraphNeuralNetworks.w_mul_xj</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">w_mul_xj(xi, xj, w) = reshape(w, (...)) .* xj</code></pre><p>Similar to <a href="#GraphNeuralNetworks.e_mul_xj"><code>e_mul_xj</code></a> but specialized on scalar edge features (weights).</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/msgpass.jl#L232-L236">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../pool/">« Pooling Layers</a><a class="docs-footer-nextpage" href="../heterograph/">Heterogeneous Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/pool/index.html b/dev/api/pool/index.html
index 8ad5e15d9..47faf43c8 100644
--- a/dev/api/pool/index.html
+++ b/dev/api/pool/index.html
@@ -13,7 +13,7 @@
 
 u = pool(g, g.ndata.x)
 
-@assert size(u) == (chout, g.num_graphs)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/pool.jl#L47-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GlobalPool" href="#GraphNeuralNetworks.GlobalPool"><code>GraphNeuralNetworks.GlobalPool</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GlobalPool(aggr)</code></pre><p>Global pooling layer for graph neural networks. Takes a graph and feature nodes as inputs and performs the operation</p><p class="math-container">\[\mathbf{u}_V = \square_{i \in V} \mathbf{x}_i\]</p><p>where <span>$V$</span> is the set of nodes of the input graph and  the type of aggregation represented by <span>$\square$</span> is selected by the <code>aggr</code> argument.  Commonly used aggregations are <code>mean</code>, <code>max</code>, and <code>+</code>.</p><p>See also <a href="../utils/#GraphNeuralNetworks.reduce_nodes"><code>reduce_nodes</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">using Flux, GraphNeuralNetworks, Graphs
+@assert size(u) == (chout, g.num_graphs)</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/pool.jl#L47-L91">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GlobalPool" href="#GraphNeuralNetworks.GlobalPool"><code>GraphNeuralNetworks.GlobalPool</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">GlobalPool(aggr)</code></pre><p>Global pooling layer for graph neural networks. Takes a graph and feature nodes as inputs and performs the operation</p><p class="math-container">\[\mathbf{u}_V = \square_{i \in V} \mathbf{x}_i\]</p><p>where <span>$V$</span> is the set of nodes of the input graph and  the type of aggregation represented by <span>$\square$</span> is selected by the <code>aggr</code> argument.  Commonly used aggregations are <code>mean</code>, <code>max</code>, and <code>+</code>.</p><p>See also <a href="../utils/#GraphNeuralNetworks.reduce_nodes"><code>reduce_nodes</code></a>.</p><p><strong>Examples</strong></p><pre><code class="language-julia hljs">using Flux, GraphNeuralNetworks, Graphs
 
 pool = GlobalPool(mean)
 
@@ -24,7 +24,7 @@
 
 g = Flux.batch([GNNGraph(erdos_renyi(10, 4)) for _ in 1:5])
 X = rand(32, 50)
-pool(g, X) # =&gt; 32x5 matrix</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/pool.jl#L3-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.Set2Set" href="#GraphNeuralNetworks.Set2Set"><code>GraphNeuralNetworks.Set2Set</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Set2Set(n_in, n_iters, n_layers = 1)</code></pre><p>Set2Set layer from the paper <a href="https://arxiv.org/abs/1511.06391">Order Matters: Sequence to sequence for sets</a>.</p><p>For each graph in the batch, the layer computes an output vector of size <code>2*n_in</code> by iterating the following steps <code>n_iters</code> times:</p><p class="math-container">\[\mathbf{q} = \mathrm{LSTM}(\mathbf{q}_{t-1}^*)
+pool(g, X) # =&gt; 32x5 matrix</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/pool.jl#L3-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.Set2Set" href="#GraphNeuralNetworks.Set2Set"><code>GraphNeuralNetworks.Set2Set</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">Set2Set(n_in, n_iters, n_layers = 1)</code></pre><p>Set2Set layer from the paper <a href="https://arxiv.org/abs/1511.06391">Order Matters: Sequence to sequence for sets</a>.</p><p>For each graph in the batch, the layer computes an output vector of size <code>2*n_in</code> by iterating the following steps <code>n_iters</code> times:</p><p class="math-container">\[\mathbf{q} = \mathrm{LSTM}(\mathbf{q}_{t-1}^*)
 \alpha_{i} = \frac{\exp(\mathbf{q}^T \mathbf{x}_i)}{\sum_{j=1}^N \exp(\mathbf{q}^T \mathbf{x}_j)} 
 \mathbf{r} = \sum_{i=1}^N \alpha_{i} \mathbf{x}_i
-\mathbf{q}^*_t = [\mathbf{q}; \mathbf{r}]\]</p><p>where <code>N</code> is the number of nodes in the graph, <code>LSTM</code> is a Long-Short-Term-Memory network with <code>n_layers</code> layers,  input size <code>2*n_in</code> and output size <code>n_in</code>.</p><p>Given a batch of graphs <code>g</code> and node features <code>x</code>, the layer returns a matrix of size <code>(2*n_in, n_graphs)</code>. ```</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/pool.jl#L148-L165">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.TopKPool" href="#GraphNeuralNetworks.TopKPool"><code>GraphNeuralNetworks.TopKPool</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">TopKPool(adj, k, in_channel)</code></pre><p>Top-k pooling layer.</p><p><strong>Arguments</strong></p><ul><li><code>adj</code>: Adjacency matrix  of a graph.</li><li><code>k</code>: Top-k nodes are selected to pool together.</li><li><code>in_channel</code>: The dimension of input channel.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/layers/pool.jl#L110-L120">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../conv/">« Convolutional Layers</a><a class="docs-footer-nextpage" href="../messagepassing/">Message Passing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+\mathbf{q}^*_t = [\mathbf{q}; \mathbf{r}]\]</p><p>where <code>N</code> is the number of nodes in the graph, <code>LSTM</code> is a Long-Short-Term-Memory network with <code>n_layers</code> layers,  input size <code>2*n_in</code> and output size <code>n_in</code>.</p><p>Given a batch of graphs <code>g</code> and node features <code>x</code>, the layer returns a matrix of size <code>(2*n_in, n_graphs)</code>. ```</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/pool.jl#L148-L165">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.TopKPool" href="#GraphNeuralNetworks.TopKPool"><code>GraphNeuralNetworks.TopKPool</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">TopKPool(adj, k, in_channel)</code></pre><p>Top-k pooling layer.</p><p><strong>Arguments</strong></p><ul><li><code>adj</code>: Adjacency matrix  of a graph.</li><li><code>k</code>: Top-k nodes are selected to pool together.</li><li><code>in_channel</code>: The dimension of input channel.</li></ul></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/layers/pool.jl#L110-L120">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../conv/">« Convolutional Layers</a><a class="docs-footer-nextpage" href="../messagepassing/">Message Passing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/temporalgraph/index.html b/dev/api/temporalgraph/index.html
index 1839c4d80..08c4ce825 100644
--- a/dev/api/temporalgraph/index.html
+++ b/dev/api/temporalgraph/index.html
@@ -17,7 +17,7 @@
   num_edges: [20, 20, 20, 20, 20]
   num_snapshots: 5
   tgdata:
-        x = 4-element Vector{Float64}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L1-L37">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64, GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.add_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64, GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.add_snapshot</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_snapshot(tg::TemporalSnapshotsGNNGraph, t::Int, g::GNNGraph)</code></pre><p>Return a <code>TemporalSnapshotsGNNGraph</code> created starting from <code>tg</code> by adding the snapshot <code>g</code> at time index <code>t</code>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using GraphNeuralNetworks
+        x = 4-element Vector{Float64}</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L1-L37">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.add_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64, GNNGraph}" href="#GraphNeuralNetworks.GNNGraphs.add_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64, GNNGraph}"><code>GraphNeuralNetworks.GNNGraphs.add_snapshot</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">add_snapshot(tg::TemporalSnapshotsGNNGraph, t::Int, g::GNNGraph)</code></pre><p>Return a <code>TemporalSnapshotsGNNGraph</code> created starting from <code>tg</code> by adding the snapshot <code>g</code> at time index <code>t</code>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using GraphNeuralNetworks
 
 julia&gt; snapshots = [rand_graph(10, 20) for i in 1:5];
 
@@ -31,7 +31,7 @@
 TemporalSnapshotsGNNGraph:
   num_nodes: [10, 10, 10, 10, 10, 10]
   num_edges: [20, 20, 16, 20, 20, 20]
-  num_snapshots: 6</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L73-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.remove_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.remove_snapshot</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_snapshot(tg::TemporalSnapshotsGNNGraph, t::Int)</code></pre><p>Return a <a href="#GraphNeuralNetworks.GNNGraphs.TemporalSnapshotsGNNGraph"><code>TemporalSnapshotsGNNGraph</code></a> created starting from <code>tg</code> by removing the snapshot at time index <code>t</code>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using GraphNeuralNetworks
+  num_snapshots: 6</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L73-L97">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.remove_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64}" href="#GraphNeuralNetworks.GNNGraphs.remove_snapshot-Tuple{TemporalSnapshotsGNNGraph, Int64}"><code>GraphNeuralNetworks.GNNGraphs.remove_snapshot</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">remove_snapshot(tg::TemporalSnapshotsGNNGraph, t::Int)</code></pre><p>Return a <a href="#GraphNeuralNetworks.GNNGraphs.TemporalSnapshotsGNNGraph"><code>TemporalSnapshotsGNNGraph</code></a> created starting from <code>tg</code> by removing the snapshot at time index <code>t</code>.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; using GraphNeuralNetworks
 
 julia&gt; snapshots = [rand_graph(10,20), rand_graph(10,14), rand_graph(10,22)];
 
@@ -45,7 +45,7 @@
 TemporalSnapshotsGNNGraph:
   num_nodes: [10, 10]
   num_edges: [20, 22]
-  num_snapshots: 2</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L133-L157">source</a></section></article><h3 id="TemporalSnapshotsGNNGraph-random-generators"><a class="docs-heading-anchor" href="#TemporalSnapshotsGNNGraph-random-generators">TemporalSnapshotsGNNGraph random generators</a><a id="TemporalSnapshotsGNNGraph-random-generators-1"></a><a class="docs-heading-anchor-permalink" href="#TemporalSnapshotsGNNGraph-random-generators" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph" href="#GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph"><code>GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_temporal_radius_graph(number_nodes::Int, 
+  num_snapshots: 2</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/temporalsnapshotsgnngraph.jl#L133-L157">source</a></section></article><h3 id="TemporalSnapshotsGNNGraph-random-generators"><a class="docs-heading-anchor" href="#TemporalSnapshotsGNNGraph-random-generators">TemporalSnapshotsGNNGraph random generators</a><a id="TemporalSnapshotsGNNGraph-random-generators-1"></a><a class="docs-heading-anchor-permalink" href="#TemporalSnapshotsGNNGraph-random-generators" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph" href="#GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph"><code>GraphNeuralNetworks.GNNGraphs.rand_temporal_radius_graph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_temporal_radius_graph(number_nodes::Int, 
                            number_snapshots::Int,
                            speed::AbstractFloat,
                            r::AbstractFloat;
@@ -57,7 +57,7 @@
 TemporalSnapshotsGNNGraph:
   num_nodes: [10, 10, 10, 10, 10]
   num_edges: [90, 90, 90, 90, 90]
-  num_snapshots: 5</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L304-L344">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph" href="#GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph"><code>GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_temporal_hyperbolic_graph(number_nodes::Int, 
+  num_snapshots: 5</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L304-L344">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph" href="#GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph"><code>GraphNeuralNetworks.GNNGraphs.rand_temporal_hyperbolic_graph</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">rand_temporal_hyperbolic_graph(number_nodes::Int, 
                                number_snapshots::Int;
                                α::Real,
                                R::Real,
@@ -70,4 +70,4 @@
 TemporalSnapshotsGNNGraph:
   num_nodes: [10, 10, 10, 10, 10]
   num_edges: [44, 46, 48, 42, 38]
-  num_snapshots: 5</code></pre><p><strong>References</strong></p><p>Section D of the paper <a href="https://arxiv.org/pdf/2101.00414.pdf">Dynamic Hidden-Variable Network Models</a> and the paper  <a href="https://arxiv.org/pdf/1006.5169.pdf">Hyperbolic Geometry of Complex Networks</a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/GNNGraphs/generate.jl#L379-L419">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterograph/">« Heterogeneous Graphs</a><a class="docs-footer-nextpage" href="../utils/">Utils »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+  num_snapshots: 5</code></pre><p><strong>References</strong></p><p>Section D of the paper <a href="https://arxiv.org/pdf/2101.00414.pdf">Dynamic Hidden-Variable Network Models</a> and the paper  <a href="https://arxiv.org/pdf/1006.5169.pdf">Hyperbolic Geometry of Complex Networks</a></p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/GNNGraphs/generate.jl#L379-L419">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterograph/">« Heterogeneous Graphs</a><a class="docs-footer-nextpage" href="../utils/">Utils »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/api/utils/index.html b/dev/api/utils/index.html
index 61e9b98c6..69920f4bf 100644
--- a/dev/api/utils/index.html
+++ b/dev/api/utils/index.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Utils · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li><a class="tocitem" href="../conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li class="is-active"><a class="tocitem" href>Utils</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#Docs"><span>Docs</span></a></li></ul></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>Utils</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Utils</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/utils.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Utility-Functions"><a class="docs-heading-anchor" href="#Utility-Functions">Utility Functions</a><a id="Utility-Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Utility-Functions" title="Permalink"></a></h1><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#GraphNeuralNetworks.broadcast_edges"><code>GraphNeuralNetworks.broadcast_edges</code></a></li><li><a href="#GraphNeuralNetworks.broadcast_nodes"><code>GraphNeuralNetworks.broadcast_nodes</code></a></li><li><a href="#GraphNeuralNetworks.reduce_edges"><code>GraphNeuralNetworks.reduce_edges</code></a></li><li><a href="#GraphNeuralNetworks.reduce_nodes"><code>GraphNeuralNetworks.reduce_nodes</code></a></li><li><a href="#GraphNeuralNetworks.softmax_edge_neighbors"><code>GraphNeuralNetworks.softmax_edge_neighbors</code></a></li><li><a href="#GraphNeuralNetworks.softmax_edges"><code>GraphNeuralNetworks.softmax_edges</code></a></li><li><a href="#GraphNeuralNetworks.softmax_nodes"><code>GraphNeuralNetworks.softmax_nodes</code></a></li><li><a href="#NNlib.gather"><code>NNlib.gather</code></a></li><li><a href="#NNlib.gather!"><code>NNlib.gather!</code></a></li><li><a href="#NNlib.scatter"><code>NNlib.scatter</code></a></li><li><a href="#NNlib.scatter!"><code>NNlib.scatter!</code></a></li></ul><h2 id="Docs"><a class="docs-heading-anchor" href="#Docs">Docs</a><a id="Docs-1"></a><a class="docs-heading-anchor-permalink" href="#Docs" title="Permalink"></a></h2><h3 id="Graph-wise-operations"><a class="docs-heading-anchor" href="#Graph-wise-operations">Graph-wise operations</a><a id="Graph-wise-operations-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-wise-operations" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.reduce_nodes" href="#GraphNeuralNetworks.reduce_nodes"><code>GraphNeuralNetworks.reduce_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">reduce_nodes(aggr, g, x)</code></pre><p>For a batched graph <code>g</code>, return the graph-wise aggregation of the node features <code>x</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>. The returned array will have last dimension <code>g.num_graphs</code>.</p><p>See also: <a href="#GraphNeuralNetworks.reduce_edges"><code>reduce_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L3-L11">source</a></section><section><div><pre><code class="nohighlight hljs">reduce_nodes(aggr, indicator::AbstractVector, x)</code></pre><p>Return the graph-wise aggregation of the node features <code>x</code> given the graph indicator <code>indicator</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>.</p><p>See also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>graph_indicator</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L18-L25">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.reduce_edges" href="#GraphNeuralNetworks.reduce_edges"><code>GraphNeuralNetworks.reduce_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">reduce_edges(aggr, g, e)</code></pre><p>For a batched graph <code>g</code>, return the graph-wise aggregation of the edge features <code>e</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>. The returned array will have last dimension <code>g.num_graphs</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L30-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_nodes" href="#GraphNeuralNetworks.softmax_nodes"><code>GraphNeuralNetworks.softmax_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_nodes(g, x)</code></pre><p>Graph-wise softmax of the node features <code>x</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L44-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_edges" href="#GraphNeuralNetworks.softmax_edges"><code>GraphNeuralNetworks.softmax_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_edges(g, e)</code></pre><p>Graph-wise softmax of the edge features <code>e</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L59-L63">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.broadcast_nodes" href="#GraphNeuralNetworks.broadcast_nodes"><code>GraphNeuralNetworks.broadcast_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">broadcast_nodes(g, x)</code></pre><p>Graph-wise broadcast array <code>x</code> of size <code>(*, g.num_graphs)</code>  to size <code>(*, g.num_nodes)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L93-L98">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.broadcast_edges" href="#GraphNeuralNetworks.broadcast_edges"><code>GraphNeuralNetworks.broadcast_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">broadcast_edges(g, x)</code></pre><p>Graph-wise broadcast array <code>x</code> of size <code>(*, g.num_graphs)</code>  to size <code>(*, g.num_edges)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L105-L110">source</a></section></article><h3 id="Neighborhood-operations"><a class="docs-heading-anchor" href="#Neighborhood-operations">Neighborhood operations</a><a id="Neighborhood-operations-1"></a><a class="docs-heading-anchor-permalink" href="#Neighborhood-operations" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_edge_neighbors" href="#GraphNeuralNetworks.softmax_edge_neighbors"><code>GraphNeuralNetworks.softmax_edge_neighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_edge_neighbors(g, e)</code></pre><p>Softmax over each node&#39;s neighborhood of the edge features <code>e</code>.</p><p class="math-container">\[\mathbf{e}&#39;_{j\to i} = \frac{e^{\mathbf{e}_{j\to i}}}
-                    {\sum_{j&#39;\in N(i)} e^{\mathbf{e}_{j&#39;\to i}}}.\]</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/utils.jl#L74-L83">source</a></section></article><h3 id="NNlib"><a class="docs-heading-anchor" href="#NNlib">NNlib</a><a id="NNlib-1"></a><a class="docs-heading-anchor-permalink" href="#NNlib" title="Permalink"></a></h3><p>Primitive functions implemented in NNlib.jl.</p><article class="docstring"><header><a class="docstring-binding" id="NNlib.gather!" href="#NNlib.gather!"><code>NNlib.gather!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">NNlib.gather!(dst, src, idx)</code></pre><p>Reverse operation of <a href="#NNlib.scatter!"><code>scatter!</code></a>. Gathers data from source <code>src</code> and writes it in destination <code>dst</code> according to the index array <code>idx</code>. For each <code>k</code> in <code>CartesianIndices(idx)</code>, assign values to <code>dst</code> according to</p><pre><code class="nohighlight hljs">dst[:, ... , k] .= src[:, ... , idx[k]...]</code></pre><p>Notice that if <code>idx</code> is a vector containing integers, and both <code>dst</code> and <code>src</code> are matrices, previous expression simplifies to</p><pre><code class="nohighlight hljs">dst[:, k] .= src[:, idx[k]]</code></pre><p>and <code>k</code> will run over <code>1:length(idx)</code>.</p><p>The elements of <code>idx</code> can be integers or integer tuples and may be repeated. A single <code>src</code> column can end up being copied into zero, one, or multiple <code>dst</code> columns.</p><p>See <a href="#NNlib.gather"><code>gather</code></a> for an allocating version.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="NNlib.gather" href="#NNlib.gather"><code>NNlib.gather</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">NNlib.gather(src, idx) -&gt; dst</code></pre><p>Reverse operation of <a href="#NNlib.scatter"><code>scatter</code></a>. Gathers data from source <code>src</code> and writes it in a destination <code>dst</code> according to the index array <code>idx</code>. For each <code>k</code> in <code>CartesianIndices(idx)</code>, assign values to <code>dst</code> according to</p><pre><code class="nohighlight hljs">dst[:, ... , k] .= src[:, ... , idx[k]...]</code></pre><p>Notice that if <code>idx</code> is a vector containing integers and <code>src</code> is a matrix, previous expression simplifies to</p><pre><code class="nohighlight hljs">dst[:, k] .= src[:, idx[k]]</code></pre><p>and <code>k</code> will run over <code>1:length(idx)</code>.</p><p>The elements of <code>idx</code> can be integers or integer tuples and may be repeated. A single <code>src</code> column can end up being copied into zero, one, or multiple <code>dst</code> columns.</p><p>See <a href="#NNlib.gather!"><code>gather!</code></a> for an in-place version.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; NNlib.gather([1,20,300,4000], [2,4,2])
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Utils · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="../.."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../../assets/documenter.js"></script><script src="../../siteinfo.js"></script><script src="../../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../../assets/themeswap.js"></script><link href="../../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../../"><img src="../../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../../models/">Model Building</a></li><li><a class="tocitem" href="../../datasets/">Datasets</a></li><li><a class="tocitem" href="../../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../basic/">Basic Layers</a></li><li><a class="tocitem" href="../conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../pool/">Pooling Layers</a></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li><li class="is-active"><a class="tocitem" href>Utils</a><ul class="internal"><li><a class="tocitem" href="#Index"><span>Index</span></a></li><li><a class="tocitem" href="#Docs"><span>Docs</span></a></li></ul></li></ul></li><li><a class="tocitem" href="../../dev/">Developer Notes</a></li><li><a class="tocitem" href="../../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">API Reference</a></li><li class="is-active"><a href>Utils</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Utils</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/api/utils.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Utility-Functions"><a class="docs-heading-anchor" href="#Utility-Functions">Utility Functions</a><a id="Utility-Functions-1"></a><a class="docs-heading-anchor-permalink" href="#Utility-Functions" title="Permalink"></a></h1><h2 id="Index"><a class="docs-heading-anchor" href="#Index">Index</a><a id="Index-1"></a><a class="docs-heading-anchor-permalink" href="#Index" title="Permalink"></a></h2><ul><li><a href="#GraphNeuralNetworks.broadcast_edges"><code>GraphNeuralNetworks.broadcast_edges</code></a></li><li><a href="#GraphNeuralNetworks.broadcast_nodes"><code>GraphNeuralNetworks.broadcast_nodes</code></a></li><li><a href="#GraphNeuralNetworks.reduce_edges"><code>GraphNeuralNetworks.reduce_edges</code></a></li><li><a href="#GraphNeuralNetworks.reduce_nodes"><code>GraphNeuralNetworks.reduce_nodes</code></a></li><li><a href="#GraphNeuralNetworks.softmax_edge_neighbors"><code>GraphNeuralNetworks.softmax_edge_neighbors</code></a></li><li><a href="#GraphNeuralNetworks.softmax_edges"><code>GraphNeuralNetworks.softmax_edges</code></a></li><li><a href="#GraphNeuralNetworks.softmax_nodes"><code>GraphNeuralNetworks.softmax_nodes</code></a></li><li><a href="#NNlib.gather"><code>NNlib.gather</code></a></li><li><a href="#NNlib.gather!"><code>NNlib.gather!</code></a></li><li><a href="#NNlib.scatter"><code>NNlib.scatter</code></a></li><li><a href="#NNlib.scatter!"><code>NNlib.scatter!</code></a></li></ul><h2 id="Docs"><a class="docs-heading-anchor" href="#Docs">Docs</a><a id="Docs-1"></a><a class="docs-heading-anchor-permalink" href="#Docs" title="Permalink"></a></h2><h3 id="Graph-wise-operations"><a class="docs-heading-anchor" href="#Graph-wise-operations">Graph-wise operations</a><a id="Graph-wise-operations-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-wise-operations" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.reduce_nodes" href="#GraphNeuralNetworks.reduce_nodes"><code>GraphNeuralNetworks.reduce_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">reduce_nodes(aggr, g, x)</code></pre><p>For a batched graph <code>g</code>, return the graph-wise aggregation of the node features <code>x</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>. The returned array will have last dimension <code>g.num_graphs</code>.</p><p>See also: <a href="#GraphNeuralNetworks.reduce_edges"><code>reduce_edges</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L3-L11">source</a></section><section><div><pre><code class="nohighlight hljs">reduce_nodes(aggr, indicator::AbstractVector, x)</code></pre><p>Return the graph-wise aggregation of the node features <code>x</code> given the graph indicator <code>indicator</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>.</p><p>See also <a href="../gnngraph/#GraphNeuralNetworks.GNNGraphs.graph_indicator-Tuple{GNNGraph}"><code>graph_indicator</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L18-L25">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.reduce_edges" href="#GraphNeuralNetworks.reduce_edges"><code>GraphNeuralNetworks.reduce_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">reduce_edges(aggr, g, e)</code></pre><p>For a batched graph <code>g</code>, return the graph-wise aggregation of the edge features <code>e</code>. The aggregation operator <code>aggr</code> can be <code>+</code>, <code>mean</code>, <code>max</code>, or <code>min</code>. The returned array will have last dimension <code>g.num_graphs</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L30-L36">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_nodes" href="#GraphNeuralNetworks.softmax_nodes"><code>GraphNeuralNetworks.softmax_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_nodes(g, x)</code></pre><p>Graph-wise softmax of the node features <code>x</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L44-L48">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_edges" href="#GraphNeuralNetworks.softmax_edges"><code>GraphNeuralNetworks.softmax_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_edges(g, e)</code></pre><p>Graph-wise softmax of the edge features <code>e</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L59-L63">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.broadcast_nodes" href="#GraphNeuralNetworks.broadcast_nodes"><code>GraphNeuralNetworks.broadcast_nodes</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">broadcast_nodes(g, x)</code></pre><p>Graph-wise broadcast array <code>x</code> of size <code>(*, g.num_graphs)</code>  to size <code>(*, g.num_nodes)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L93-L98">source</a></section></article><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.broadcast_edges" href="#GraphNeuralNetworks.broadcast_edges"><code>GraphNeuralNetworks.broadcast_edges</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">broadcast_edges(g, x)</code></pre><p>Graph-wise broadcast array <code>x</code> of size <code>(*, g.num_graphs)</code>  to size <code>(*, g.num_edges)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L105-L110">source</a></section></article><h3 id="Neighborhood-operations"><a class="docs-heading-anchor" href="#Neighborhood-operations">Neighborhood operations</a><a id="Neighborhood-operations-1"></a><a class="docs-heading-anchor-permalink" href="#Neighborhood-operations" title="Permalink"></a></h3><article class="docstring"><header><a class="docstring-binding" id="GraphNeuralNetworks.softmax_edge_neighbors" href="#GraphNeuralNetworks.softmax_edge_neighbors"><code>GraphNeuralNetworks.softmax_edge_neighbors</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">softmax_edge_neighbors(g, e)</code></pre><p>Softmax over each node&#39;s neighborhood of the edge features <code>e</code>.</p><p class="math-container">\[\mathbf{e}&#39;_{j\to i} = \frac{e^{\mathbf{e}_{j\to i}}}
+                    {\sum_{j&#39;\in N(i)} e^{\mathbf{e}_{j&#39;\to i}}}.\]</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/utils.jl#L74-L83">source</a></section></article><h3 id="NNlib"><a class="docs-heading-anchor" href="#NNlib">NNlib</a><a id="NNlib-1"></a><a class="docs-heading-anchor-permalink" href="#NNlib" title="Permalink"></a></h3><p>Primitive functions implemented in NNlib.jl.</p><article class="docstring"><header><a class="docstring-binding" id="NNlib.gather!" href="#NNlib.gather!"><code>NNlib.gather!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">NNlib.gather!(dst, src, idx)</code></pre><p>Reverse operation of <a href="#NNlib.scatter!"><code>scatter!</code></a>. Gathers data from source <code>src</code> and writes it in destination <code>dst</code> according to the index array <code>idx</code>. For each <code>k</code> in <code>CartesianIndices(idx)</code>, assign values to <code>dst</code> according to</p><pre><code class="nohighlight hljs">dst[:, ... , k] .= src[:, ... , idx[k]...]</code></pre><p>Notice that if <code>idx</code> is a vector containing integers, and both <code>dst</code> and <code>src</code> are matrices, previous expression simplifies to</p><pre><code class="nohighlight hljs">dst[:, k] .= src[:, idx[k]]</code></pre><p>and <code>k</code> will run over <code>1:length(idx)</code>.</p><p>The elements of <code>idx</code> can be integers or integer tuples and may be repeated. A single <code>src</code> column can end up being copied into zero, one, or multiple <code>dst</code> columns.</p><p>See <a href="#NNlib.gather"><code>gather</code></a> for an allocating version.</p></div></section></article><article class="docstring"><header><a class="docstring-binding" id="NNlib.gather" href="#NNlib.gather"><code>NNlib.gather</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">NNlib.gather(src, idx) -&gt; dst</code></pre><p>Reverse operation of <a href="#NNlib.scatter"><code>scatter</code></a>. Gathers data from source <code>src</code> and writes it in a destination <code>dst</code> according to the index array <code>idx</code>. For each <code>k</code> in <code>CartesianIndices(idx)</code>, assign values to <code>dst</code> according to</p><pre><code class="nohighlight hljs">dst[:, ... , k] .= src[:, ... , idx[k]...]</code></pre><p>Notice that if <code>idx</code> is a vector containing integers and <code>src</code> is a matrix, previous expression simplifies to</p><pre><code class="nohighlight hljs">dst[:, k] .= src[:, idx[k]]</code></pre><p>and <code>k</code> will run over <code>1:length(idx)</code>.</p><p>The elements of <code>idx</code> can be integers or integer tuples and may be repeated. A single <code>src</code> column can end up being copied into zero, one, or multiple <code>dst</code> columns.</p><p>See <a href="#NNlib.gather!"><code>gather!</code></a> for an in-place version.</p><p><strong>Examples</strong></p><pre><code class="language-julia-repl hljs">julia&gt; NNlib.gather([1,20,300,4000], [2,4,2])
 3-element Vector{Int64}:
    20
  4000
@@ -45,4 +45,4 @@
     10
   2000
     10
-    10</code></pre></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../temporalgraph/">« Temporal Graphs</a><a class="docs-footer-nextpage" href="../../dev/">Developer Notes »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+    10</code></pre></div></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../temporalgraph/">« Temporal Graphs</a><a class="docs-footer-nextpage" href="../../dev/">Developer Notes »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/datasets/index.html b/dev/datasets/index.html
index 59a935591..782ac01d1 100644
--- a/dev/datasets/index.html
+++ b/dev/datasets/index.html
@@ -10,4 +10,4 @@
         targets =&gt; 2708-element Vector{Int64}
         train_mask =&gt; 2708-element BitVector
         val_mask =&gt; 2708-element BitVector
-        test_mask =&gt; 2708-element BitVector</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/b07aaa2179076f3ba338d1bd0a4c181f49fc91c1/src/mldatasets.jl#L3-L24">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../models/">« Model Building</a><a class="docs-footer-nextpage" href="../tutorials/">Tutorials »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+        test_mask =&gt; 2708-element BitVector</code></pre></div><a class="docs-sourcelink" target="_blank" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/7ddadab2e98fa25d479ace1102643859be95a44a/src/mldatasets.jl#L3-L24">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../models/">« Model Building</a><a class="docs-footer-nextpage" href="../tutorials/">Tutorials »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/dev/index.html b/dev/dev/index.html
index f799936e1..56b3efd20 100644
--- a/dev/dev/index.html
+++ b/dev/dev/index.html
@@ -13,4 +13,4 @@
 julia&gt; @load &quot;perf_pr_20210803_mymachine.jld2&quot;
 
 julia&gt; compare(dfpr, dfmaster)</code></pre><h2 id="Caching-tutorials"><a class="docs-heading-anchor" href="#Caching-tutorials">Caching tutorials</a><a id="Caching-tutorials-1"></a><a class="docs-heading-anchor-permalink" href="#Caching-tutorials" title="Permalink"></a></h2><p>Tutorials in GraphNeuralNetworks.jl are written in Pluto and rendered using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a> and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a>. Rendering a Pluto notebook is time and resource-consuming, especially in a CI environment. So we use the <a href="https://huijzer.xyz/PlutoStaticHTML.jl/dev/#Caching">caching functionality</a> provided by PlutoStaticHTML.jl to reduce CI time.</p><p>If you are contributing a new tutorial or making changes to the existing notebook, generate the docs locally before committing/pushing. For caching to work, the cache environment(your local) and the documenter CI should have the same Julia version (e.g. &quot;v1.9.1&quot;, also the patch number must match). So use the <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/.github/workflows/docs.yml#L17">documenter CI Julia version</a> for generating docs locally.</p><pre><code class="language-console hljs">julia --version # check julia version before generating docs
-julia --project=docs docs/make.jl</code></pre><p>Note: Use <a href="https://github.com/JuliaLang/juliaup">juliaup</a> for easy switching of Julia versions.</p><p>During the doc generation process, DemoCards.jl stores the cache notebooks in docs/pluto_output. So add any changes made in this folder in your git commit. Remember that every file in this folder is machine-generated and should not be edited manually.</p><pre><code class="nohighlight hljs">git add docs/pluto_output # add generated cache</code></pre><p>Check the <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/actions/workflows/docs.yml">documenter CI logs</a> to ensure that it used the local cache:</p><p><img src="https://user-images.githubusercontent.com/55111154/210061301-c84b7274-9e66-46fd-b272-d45b1c681d00.png" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api/utils/">« Utils</a><a class="docs-footer-nextpage" href="../gsoc/">Summer Of Code »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+julia --project=docs docs/make.jl</code></pre><p>Note: Use <a href="https://github.com/JuliaLang/juliaup">juliaup</a> for easy switching of Julia versions.</p><p>During the doc generation process, DemoCards.jl stores the cache notebooks in docs/pluto_output. So add any changes made in this folder in your git commit. Remember that every file in this folder is machine-generated and should not be edited manually.</p><pre><code class="nohighlight hljs">git add docs/pluto_output # add generated cache</code></pre><p>Check the <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/actions/workflows/docs.yml">documenter CI logs</a> to ensure that it used the local cache:</p><p><img src="https://user-images.githubusercontent.com/55111154/210061301-c84b7274-9e66-46fd-b272-d45b1c681d00.png" alt/></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../api/utils/">« Utils</a><a class="docs-footer-nextpage" href="../gsoc/">Summer Of Code »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/gnngraph/index.html b/dev/gnngraph/index.html
index 3598d40ad..21a82df4e 100644
--- a/dev/gnngraph/index.html
+++ b/dev/gnngraph/index.html
@@ -167,4 +167,4 @@
 julia&gt; GNNGraph(gd)
 GNNGraph:
   num_nodes: 10
-  num_edges: 20</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../heterograph/">Heterogeneous Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+  num_edges: 20</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../heterograph/">Heterogeneous Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/gsoc/index.html b/dev/gsoc/index.html
index 716f75811..ec82e129f 100644
--- a/dev/gsoc/index.html
+++ b/dev/gsoc/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Summer Of Code · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../models/">Model Building</a></li><li><a class="tocitem" href="../datasets/">Datasets</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../api/gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../api/basic/">Basic Layers</a></li><li><a class="tocitem" href="../api/conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../api/pool/">Pooling Layers</a></li><li><a class="tocitem" href="../api/messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../api/heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../api/temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../api/utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../dev/">Developer Notes</a></li><li class="is-active"><a class="tocitem" href>Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Summer Of Code</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Summer Of Code</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/gsoc.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Graph-Neural-Networks-Summer-of-Code"><a class="docs-heading-anchor" href="#Graph-Neural-Networks-Summer-of-Code">Graph Neural Networks - Summer of Code</a><a id="Graph-Neural-Networks-Summer-of-Code-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-Neural-Networks-Summer-of-Code" title="Permalink"></a></h1><p>Potential candidates to Google Summer of Code&#39;s scholarships can find out about the available projects involving GraphNeuralNetworks.jl on the <a href="https://julialang.org/jsoc/gsoc/gnn/">dedicated page</a> in the Julia Language website.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../dev/">« Developer Notes</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Summer Of Code · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../models/">Model Building</a></li><li><a class="tocitem" href="../datasets/">Datasets</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../api/gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../api/basic/">Basic Layers</a></li><li><a class="tocitem" href="../api/conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../api/pool/">Pooling Layers</a></li><li><a class="tocitem" href="../api/messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../api/heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../api/temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../api/utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../dev/">Developer Notes</a></li><li class="is-active"><a class="tocitem" href>Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Summer Of Code</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Summer Of Code</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/docs/src/gsoc.md" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Graph-Neural-Networks-Summer-of-Code"><a class="docs-heading-anchor" href="#Graph-Neural-Networks-Summer-of-Code">Graph Neural Networks - Summer of Code</a><a id="Graph-Neural-Networks-Summer-of-Code-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-Neural-Networks-Summer-of-Code" title="Permalink"></a></h1><p>Potential candidates to Google Summer of Code&#39;s scholarships can find out about the available projects involving GraphNeuralNetworks.jl on the <a href="https://julialang.org/jsoc/gsoc/gnn/">dedicated page</a> in the Julia Language website.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../dev/">« Developer Notes</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/heterograph/index.html b/dev/heterograph/index.html
index 83edaf359..548d4b50a 100644
--- a/dev/heterograph/index.html
+++ b/dev/heterograph/index.html
@@ -81,4 +81,4 @@
     @assert g.num_nodes[:A] == 80
     @assert size(g.ndata[:A].x) == (3, 80)    
     # ...
-end</code></pre><h2 id="Graph-convolutions-on-heterographs"><a class="docs-heading-anchor" href="#Graph-convolutions-on-heterographs">Graph convolutions on heterographs</a><a id="Graph-convolutions-on-heterographs-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-convolutions-on-heterographs" title="Permalink"></a></h2><p>See <a href="../api/heterograph/#GraphNeuralNetworks.HeteroGraphConv"><code>HeteroGraphConv</code></a> for how to perform convolutions on heterogeneous graphs.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../gnngraph/">« Working with GNNGraph</a><a class="docs-footer-nextpage" href="../temporalgraph/">Temporal Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+end</code></pre><h2 id="Graph-convolutions-on-heterographs"><a class="docs-heading-anchor" href="#Graph-convolutions-on-heterographs">Graph convolutions on heterographs</a><a id="Graph-convolutions-on-heterographs-1"></a><a class="docs-heading-anchor-permalink" href="#Graph-convolutions-on-heterographs" title="Permalink"></a></h2><p>See <a href="../api/heterograph/#GraphNeuralNetworks.HeteroGraphConv"><code>HeteroGraphConv</code></a> for how to perform convolutions on heterogeneous graphs.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../gnngraph/">« Working with GNNGraph</a><a class="docs-footer-nextpage" href="../temporalgraph/">Temporal Graphs »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/index.html b/dev/index.html
index 9acc90330..55744c865 100644
--- a/dev/index.html
+++ b/dev/index.html
@@ -37,4 +37,4 @@
     end
 
     @info (; epoch, train_loss=loss(model, train_loader), test_loss=loss(model, test_loader))
-end</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="gnngraph/">Working with GNNGraph »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+end</code></pre></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="gnngraph/">Working with GNNGraph »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/messagepassing/index.html b/dev/messagepassing/index.html
index 2ed465e64..e232af39f 100644
--- a/dev/messagepassing/index.html
+++ b/dev/messagepassing/index.html
@@ -76,4 +76,4 @@
     x = propagate(message, g, +, xj=x) 
 
     return l.σ.(l.weight * x .+ l.bias)
-end</code></pre><p>See the <a href="../api/conv/#GraphNeuralNetworks.GATConv"><code>GATConv</code></a> implementation <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/src/layers/conv.jl">here</a> for a more complex example.</p><h2 id="Built-in-message-functions"><a class="docs-heading-anchor" href="#Built-in-message-functions">Built-in message functions</a><a id="Built-in-message-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Built-in-message-functions" title="Permalink"></a></h2><p>In order to exploit optimized specializations of the <a href="../api/messagepassing/#GraphNeuralNetworks.propagate"><code>propagate</code></a>, it is recommended  to use built-in message functions such as <a href="../api/messagepassing/#GraphNeuralNetworks.copy_xj"><code>copy_xj</code></a> whenever possible. </p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../temporalgraph/">« Temporal Graphs</a><a class="docs-footer-nextpage" href="../models/">Model Building »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+end</code></pre><p>See the <a href="../api/conv/#GraphNeuralNetworks.GATConv"><code>GATConv</code></a> implementation <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/blob/master/src/layers/conv.jl">here</a> for a more complex example.</p><h2 id="Built-in-message-functions"><a class="docs-heading-anchor" href="#Built-in-message-functions">Built-in message functions</a><a id="Built-in-message-functions-1"></a><a class="docs-heading-anchor-permalink" href="#Built-in-message-functions" title="Permalink"></a></h2><p>In order to exploit optimized specializations of the <a href="../api/messagepassing/#GraphNeuralNetworks.propagate"><code>propagate</code></a>, it is recommended  to use built-in message functions such as <a href="../api/messagepassing/#GraphNeuralNetworks.copy_xj"><code>copy_xj</code></a> whenever possible. </p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../temporalgraph/">« Temporal Graphs</a><a class="docs-footer-nextpage" href="../models/">Model Building »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/models/index.html b/dev/models/index.html
index 5a52cb217..42c31a820 100644
--- a/dev/models/index.html
+++ b/dev/models/index.html
@@ -66,4 +66,4 @@
 X = randn(Float32, din, 10)
 
 # Pass only X as input, the model already contains the graph.
-y = model(X) </code></pre><p>An example of <code>WithGraph</code> usage is given in the graph neural ODE script in the <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/examples">examples</a> folder.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../messagepassing/">« Message Passing</a><a class="docs-footer-nextpage" href="../datasets/">Datasets »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+y = model(X) </code></pre><p>An example of <code>WithGraph</code> usage is given in the graph neural ODE script in the <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/tree/master/examples">examples</a> folder.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../messagepassing/">« Message Passing</a><a class="docs-footer-nextpage" href="../datasets/">Datasets »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/search/index.html b/dev/search/index.html
index 1057f8ddf..07296cf93 100644
--- a/dev/search/index.html
+++ b/dev/search/index.html
@@ -1,2 +1,2 @@
 <!DOCTYPE html>
-<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../models/">Model Building</a></li><li><a class="tocitem" href="../datasets/">Datasets</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../api/gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../api/basic/">Basic Layers</a></li><li><a class="tocitem" href="../api/conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../api/pool/">Pooling Layers</a></li><li><a class="tocitem" href="../api/messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../api/heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../api/temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../api/utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../dev/">Developer Notes</a></li><li><a class="tocitem" href="../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
+<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Search · GraphNeuralNetworks.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script><link href="../democards/gridtheme.css" rel="stylesheet" type="text/css"/></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="../"><img src="../assets/logo.svg" alt="GraphNeuralNetworks.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="../">GraphNeuralNetworks.jl</a></span></div><form class="docs-search" action><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><span class="tocitem">Graphs</span><ul><li><a class="tocitem" href="../gnngraph/">Working with GNNGraph</a></li><li><a class="tocitem" href="../heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../temporalgraph/">Temporal Graphs</a></li></ul></li><li><a class="tocitem" href="../messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../models/">Model Building</a></li><li><a class="tocitem" href="../datasets/">Datasets</a></li><li><a class="tocitem" href="../tutorials/">Tutorials</a></li><li><span class="tocitem">API Reference</span><ul><li><a class="tocitem" href="../api/gnngraph/">GNNGraph</a></li><li><a class="tocitem" href="../api/basic/">Basic Layers</a></li><li><a class="tocitem" href="../api/conv/">Convolutional Layers</a></li><li><a class="tocitem" href="../api/pool/">Pooling Layers</a></li><li><a class="tocitem" href="../api/messagepassing/">Message Passing</a></li><li><a class="tocitem" href="../api/heterograph/">Heterogeneous Graphs</a></li><li><a class="tocitem" href="../api/temporalgraph/">Temporal Graphs</a></li><li><a class="tocitem" href="../api/utils/">Utils</a></li></ul></li><li><a class="tocitem" href="../dev/">Developer Notes</a></li><li><a class="tocitem" href="../gsoc/">Summer Of Code</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Search</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Search</a></li></ul></nav><div class="docs-right"><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article><p id="documenter-search-info">Loading search...</p><ul id="documenter-search-results"></ul></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body><script src="../search_index.js"></script><script src="../assets/search.js"></script></html>
diff --git a/dev/temporalgraph/index.html b/dev/temporalgraph/index.html
index 06269b5c2..1199c87d8 100644
--- a/dev/temporalgraph/index.html
+++ b/dev/temporalgraph/index.html
@@ -81,4 +81,4 @@
   x = 5×10 Matrix{Float64}
 
 julia&gt; typeof(tg.ndata.x) # vector containing the x feature of each snapshot
-Vector{Matrix{Float64}}</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterograph/">« Heterogeneous Graphs</a><a class="docs-footer-nextpage" href="../messagepassing/">Message Passing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+Vector{Matrix{Float64}}</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../heterograph/">« Heterogeneous Graphs</a><a class="docs-footer-nextpage" href="../messagepassing/">Message Passing »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/tutorials/index.html b/dev/tutorials/index.html
index eb53a3fa3..eaf7719f3 100644
--- a/dev/tutorials/index.html
+++ b/dev/tutorials/index.html
@@ -15,4 +15,4 @@
 <div class="grid-card-cover">
 <div class="grid-card-description"><p>Traffic Prediction using GraphNeuralNetworks.jl</p></div><p><a href="introductory_tutorials/traffic_prediction/#Traffic-Prediction-using-recurrent-Temporal-Graph-Convolutional-Network"><img src="covers/traffic_prediction.gif" alt="card-cover-image"/></a></p></div>
 <div class="grid-card-text"><p><a href="introductory_tutorials/traffic_prediction/#Traffic-Prediction-using-recurrent-Temporal-Graph-Convolutional-Network">Traffic Prediction using recurrent Temporal Graph Convolutional Network</a></p></div>
-</div></div><hr/><h2 id="Contributions"><a class="docs-heading-anchor" href="#Contributions">Contributions</a><a id="Contributions-1"></a><a class="docs-heading-anchor-permalink" href="#Contributions" title="Permalink"></a></h2><p>If you have a suggestion on adding new tutorials, feel free to create a new issue <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/issues/new">here</a>. Users are invited to contribute demonstrations of their own. If you want to contribute new tutorials and looking for inspiration, checkout these tutorials from <a href="https://pytorch-geometric.readthedocs.io/en/latest/notes/colabs.html">PyTorch Geometric</a>. You are expected to use <a href="https://github.com/fonsp/Pluto.jl">Pluto.jl</a> notebooks with <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. Please check out existing tutorials for more details.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../datasets/">« Datasets</a><a class="docs-footer-nextpage" href="../api/gnngraph/">GNNGraph »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+</div></div><hr/><h2 id="Contributions"><a class="docs-heading-anchor" href="#Contributions">Contributions</a><a id="Contributions-1"></a><a class="docs-heading-anchor-permalink" href="#Contributions" title="Permalink"></a></h2><p>If you have a suggestion on adding new tutorials, feel free to create a new issue <a href="https://github.com/CarloLucibello/GraphNeuralNetworks.jl/issues/new">here</a>. Users are invited to contribute demonstrations of their own. If you want to contribute new tutorials and looking for inspiration, checkout these tutorials from <a href="https://pytorch-geometric.readthedocs.io/en/latest/notes/colabs.html">PyTorch Geometric</a>. You are expected to use <a href="https://github.com/fonsp/Pluto.jl">Pluto.jl</a> notebooks with <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. Please check out existing tutorials for more details.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../datasets/">« Datasets</a><a class="docs-footer-nextpage" href="../api/gnngraph/">GNNGraph »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/tutorials/introductory_tutorials/gnn_intro_pluto/index.html b/dev/tutorials/introductory_tutorials/gnn_intro_pluto/index.html
index e6e61e94d..31a4ea2a4 100644
--- a/dev/tutorials/introductory_tutorials/gnn_intro_pluto/index.html
+++ b/dev/tutorials/introductory_tutorials/gnn_intro_pluto/index.html
@@ -252,4 +252,4 @@ <h2 id="Implementing-Graph-Neural-Networks"><a class="docs-heading-anchor" href=
 
 <div class="markdown"><p>As one can see, our 3-layer GCN model manages to linearly separating the communities and classifying most of the nodes correctly.</p><p>Furthermore, we did this all with a few lines of code, thanks to the GraphNeuralNetworks.jl which helped us out with data handling and GNN implementations.</p></div>
 
-<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/tutorials/introductory_tutorials/graph_classification_pluto/index.html b/dev/tutorials/introductory_tutorials/graph_classification_pluto/index.html
index b28dce2d9..c46f67329 100644
--- a/dev/tutorials/introductory_tutorials/graph_classification_pluto/index.html
+++ b/dev/tutorials/introductory_tutorials/graph_classification_pluto/index.html
@@ -207,4 +207,4 @@ <h2 id="Training-a-Graph-Neural-Network-(GNN)"><a class="docs-heading-anchor" hr
 <h2 id="Conclusion"><a class="docs-heading-anchor" href="#Conclusion">Conclusion</a><a id="Conclusion-1"></a><a class="docs-heading-anchor-permalink" href="#Conclusion" title="Permalink"></a></h2><div class="markdown">
 <p>In this chapter, you have learned how to apply GNNs to the task of graph classification. You have learned how graphs can be batched together for better GPU utilization, and how to apply readout layers for obtaining graph embeddings rather than node embeddings.</p></div>
 
-<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/tutorials/introductory_tutorials/node_classification_pluto/index.html b/dev/tutorials/introductory_tutorials/node_classification_pluto/index.html
index c0f5e5870..7a193e10a 100644
--- a/dev/tutorials/introductory_tutorials/node_classification_pluto/index.html
+++ b/dev/tutorials/introductory_tutorials/node_classification_pluto/index.html
@@ -304,4 +304,4 @@ <h2 id="(Optional)-Exercises"><a class="docs-heading-anchor" href="#(Optional)-E
 <h2 id="Conclusion"><a class="docs-heading-anchor" href="#Conclusion">Conclusion</a><a id="Conclusion-1"></a><a class="docs-heading-anchor-permalink" href="#Conclusion" title="Permalink"></a></h2><div class="markdown">
 <p>In this tutorial, we have seen how to apply GNNs to real-world problems, and, in particular, how they can effectively be used for boosting a model's performance. In the next tutorial, we will look into how GNNs can be used for the task of graph classification.</p></div>
 
-<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
diff --git a/dev/tutorials/introductory_tutorials/traffic_prediction/index.html b/dev/tutorials/introductory_tutorials/traffic_prediction/index.html
index 54b950542..6694e8a82 100644
--- a/dev/tutorials/introductory_tutorials/traffic_prediction/index.html
+++ b/dev/tutorials/introductory_tutorials/traffic_prediction/index.html
@@ -199,4 +199,4 @@ <h2 id="Training"><a class="docs-heading-anchor" href="#Training">Training</a><a
 <h2 id="Conclusion"><a class="docs-heading-anchor" href="#Conclusion">Conclusion</a><a id="Conclusion-1"></a><a class="docs-heading-anchor-permalink" href="#Conclusion" title="Permalink"></a></h2><div class="markdown">
 <p>In this tutorial, we learned how to use a recurrent temporal graph convolutional network to predict traffic in a spatio-temporal setting. We used the TGCN model, which consists of a graph convolutional network (GCN) and a gated recurrent unit (GRU). We then trained the model for 100 epochs on a small subset of the METR-LA dataset. The accuracy of the model is not very good, but it can be improved by training on more data.</p></div>
 
-<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 16:31">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+<!-- PlutoStaticHTML.End --><hr/><p><em>This page was generated using <a href="https://github.com/JuliaDocs/DemoCards.jl">DemoCards.jl</a>. and <a href="https://github.com/rikhuijzer/PlutoStaticHTML.jl">PlutoStaticHTML.jl</a></em></p></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.25 on <span class="colophon-date" title="Sunday 28 January 2024 17:54">Sunday 28 January 2024</span>. Using Julia version 1.9.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>