cogdl.models.nn.dgl_gcc

Module Contents

Functions

batcher()

test_moco(train_loader, model, opt)

one epoch training for moco

eigen_decomposision(n, k, laplacian, hidden_size, retry)

_add_undirected_graph_positional_embedding(g, hidden_size, retry=10)

_rwr_trace_to_dgl_graph(g, seed, trace, positional_embedding_size, entire_graph=False)

cogdl.models.nn.dgl_gcc.batcher()[source]
cogdl.models.nn.dgl_gcc.test_moco(train_loader, model, opt)[source]

one epoch training for moco

cogdl.models.nn.dgl_gcc.eigen_decomposision(n, k, laplacian, hidden_size, retry)[source]
cogdl.models.nn.dgl_gcc._add_undirected_graph_positional_embedding(g, hidden_size, retry=10)[source]
cogdl.models.nn.dgl_gcc._rwr_trace_to_dgl_graph(g, seed, trace, positional_embedding_size, entire_graph=False)[source]
class cogdl.models.nn.dgl_gcc.NodeClassificationDataset(data, rw_hops=64, subgraph_size=64, restart_prob=0.8, positional_embedding_size=32, step_dist=[1.0, 0.0, 0.0])[source]

Bases: object

_create_dgl_graph(self, data)[source]
__len__(self)[source]
_convert_idx(self, idx)[source]
__getitem__(self, idx)[source]
class cogdl.models.nn.dgl_gcc.GraphClassificationDataset(data, rw_hops=64, subgraph_size=64, restart_prob=0.8, positional_embedding_size=32, step_dist=[1.0, 0.0, 0.0])[source]

Bases: cogdl.models.nn.dgl_gcc.NodeClassificationDataset

_convert_idx(self, idx)[source]
class cogdl.models.nn.dgl_gcc.GCC(load_path)[source]

Bases: cogdl.models.BaseModel

static add_args(parser)[source]

Add model-specific arguments to the parser.

classmethod build_model_from_args(cls, args)[source]

Build a new model instance.

train(self, data)[source]