MCPcopy
hub / github.com/tkipf/gcn / preprocess_adj

Function preprocess_adj

gcn/utils.py:132–135  ·  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

130
131
132def preprocess_adj(adj):
133 """Preprocessing of adjacency matrix for simple GCN model and conversion to tuple representation."""
134 adj_normalized = normalize_adj(adj + sp.eye(adj.shape[0]))
135 return sparse_to_tuple(adj_normalized)
136
137
138def construct_feed_dict(features, support, labels, labels_mask, placeholders):

Callers 1

train.pyFile · 0.85

Calls 2

normalize_adjFunction · 0.85
sparse_to_tupleFunction · 0.85

Tested by

no test coverage detected