models.nn.grand

Module Contents

Classes

MLPLayer

Grand

class models.nn.grand.MLPLayer(in_features, out_features, bias=True)[source]

Bases: torch.nn.Module

reset_parameters(self)[source]
forward(self, x)[source]
__repr__(self)[source]
class models.nn.grand.Grand(nfeat, nhid, nclass, input_droprate, hidden_droprate, use_bn, dropnode_rate, tem, lam, order, sample, alpha)[source]

Bases: 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.

dropNode(self, x)[source]
normalize_adj(self, edge_index, edge_weight, num_nodes)[source]
rand_prop(self, x, edge_index, edge_weight)[source]
consis_loss(self, logps, train_mask)[source]
normalize_x(self, x)[source]
forward(self, x, edge_index)[source]
adj = torch.sparse_coo_tensor(

edge_index, torch.ones(edge_index.shape[1]).float(), (x.shape[0], x.shape[0]),

).to(x.device)

loss(self, data)[source]
predict(self, data)[source]