MCPcopy Create free account
hub / github.com/NineAbyss/ZeroG / graphcl_augmentation

Function graphcl_augmentation

code/utils.py:223–234  ·  view source on GitHub ↗
(features, edge_index)

Source from the content-addressed store, hash-verified

221# ======================================================================
222
223def graphcl_augmentation(features, edge_index):
224
225 n = np.random.randint(2)
226 if n == 0:
227 edge_index, _ = dropout_edge(edge_index.clone(), p=0.1)
228 elif n == 1:
229 features, _ = mask_feature(features.clone(), p=0.1, mode='all')
230 else:
231 print('sample error')
232 assert False
233
234 return features, edge_index
235
236
237def infomax_corruption(features, batch):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected