MCPcopy Index your code
hub / github.com/PetarV-/GAT / preprocess_adj

Function preprocess_adj

utils/process.py:174–177  ·  view source on GitHub ↗

Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation.

(adj)

Source from the content-addressed store, hash-verified

172
173
174def preprocess_adj(adj):
175 """Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation."""
176 adj_normalized = normalize_adj(adj + sp.eye(adj.shape[0]))
177 return sparse_to_tuple(adj_normalized)
178
179def preprocess_adj_bias(adj):
180 num_nodes = adj.shape[0]

Callers

nothing calls this directly

Calls 2

normalize_adjFunction · 0.85
sparse_to_tupleFunction · 0.85

Tested by

no test coverage detected