models.emb.sdne

Module Contents

Classes

SDNE_layer

SDNE

The SDNE model from the `”Structural Deep Network Embedding”

class models.emb.sdne.SDNE_layer(num_node, hidden_size1, hidden_size2, droput, alpha, beta, nu1, nu2)[source]

Bases: torch.nn.Module

forward(self, adj_mat, l_mat)[source]
get_emb(self, adj)[source]
class models.emb.sdne.SDNE(hidden_size1, hidden_size2, droput, alpha, beta, nu1, nu2, max_epoch, lr, cpu)[source]

Bases: models.BaseModel

The SDNE model from the “Structural Deep Network Embedding” paper

Args:

hidden_size1 (int) : The size of the first hidden layer. hidden_size2 (int) : The size of the second hidden layer. droput (float) : Droput rate. alpha (float) : Trade-off parameter between 1-st and 2-nd order objective function in SDNE. beta (float) : Parameter of 2-nd order objective function in SDNE. nu1 (float) : Parameter of l1 normlization in SDNE. nu2 (float) : Parameter of l2 normlization in SDNE. max_epoch (int) : The max epoches in training step. lr (float) : Learning rate in SDNE. cpu (bool) : Use CPU or GPU to train hin2vec.

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, G)[source]