cogdl.models.emb.dngr

Module Contents

Classes

DNGR_layer

DNGR

The DNGR model from the `”Deep Neural Networks for Learning Graph Representations”

class cogdl.models.emb.dngr.DNGR_layer(num_node, hidden_size1, hidden_size2)[source]

Bases: torch.nn.Module

forward(self, x)[source]
class cogdl.models.emb.dngr.DNGR(hidden_size1, hidden_size2, noise, alpha, step, max_epoch, lr, cpu)[source]

Bases: cogdl.models.BaseModel

The DNGR model from the “Deep Neural Networks for Learning Graph Representations” paper

Args:

hidden_size1 (int) : The size of the first hidden layer. hidden_size2 (int) : The size of the second hidden layer. noise (float) : Denoise rate of DAE. alpha (float) : Parameter in DNGR. step (int) : The max step in random surfing. max_epoch (int) : The max epoches in training step. lr (float) : Learning rate in DNGR.

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.

scale_matrix(self, mat)[source]
random_surfing(self, adj_matrix)[source]
get_ppmi_matrix(self, mat)[source]
get_denoised_matrix(self, mat)[source]
get_emb(self, matrix)[source]
train(self, G)[source]