deepsnap

use(netlib=None)[source]

Specifies to use which graph library as the DeepSNAP backend. The default backend is NetworkX. Current DeepSNAP also supports Snap.py (SnapX) backend for undirected homogeneous graph. You can switch the backend to SnapX via:

import snap
import snapx as sx
import deepsnap
deepsnap.use(sx)
Parameters

netlib (types.ModuleType, optional) – The graph backend module. Currently DeepSNAP supports the NetworkX and SnapX (for SnapX only the undirected homogeneous graph) as the graph backend. Default graph backend is the NetworkX.

set_seed(seed)[source]

Sets seeds to generate random numbers. This function will set seeds of random.seed, numpy.random.seed, torch.manual_seed, and torch.cuda.manual_seed_all to be the seed.

Use the function in following way:

import deepsnap
deepsnap.set_seed(1)
Parameters

seed (int) – The seed value to generate random numbers.