sparse_laplacian_normalization#

class deeplay.components.gnn.gcn.normalization.sparse_laplacian_normalization(*args, **kwargs)#

Bases: DeeplayModule

Methods Summary

add_self_loops(A, num_nodes)

Add self-loops to the adjacency matrix of a graph.

degree(A, num_nodes)

Compute the degree of each node in a graph given its edge index.

forward(x, A)

Define the computation performed at every call.

normalize(x, A)

Methods Documentation

add_self_loops(A, num_nodes)#

Add self-loops to the adjacency matrix of a graph.

degree(A, num_nodes)#

Compute the degree of each node in a graph given its edge index.

forward(x, A)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

normalize(x, A)#