cogdl.models.nn.pyg_gcnmix

Module Contents

Functions

mix_hidden_state(feat, target, train_index, alpha)

sharpen(prob, temperature)

get_one_hot_label(labels, index)

get_current_consistency_weight(final_consistency_weight, rampup_starts, rampup_ends, epoch)

cogdl.models.nn.pyg_gcnmix.mix_hidden_state(feat, target, train_index, alpha)[source]
cogdl.models.nn.pyg_gcnmix.sharpen(prob, temperature)[source]
cogdl.models.nn.pyg_gcnmix.get_one_hot_label(labels, index)[source]
cogdl.models.nn.pyg_gcnmix.get_current_consistency_weight(final_consistency_weight, rampup_starts, rampup_ends, epoch)[source]
class cogdl.models.nn.pyg_gcnmix.GCNConv(in_feats, out_feats)[source]

Bases: torch.nn.Module

forward(self, x, edge_index, edge_attr=None)[source]
forward_aux(self, x)[source]
class cogdl.models.nn.pyg_gcnmix.BaseGNNMix(in_feat, hidden_size, num_classes, k, temperature, alpha, dropout)[source]

Bases: cogdl.models.BaseModel

forward(self, x, edge_index)[source]
forward_aux(self, x, label, train_index, mix_hidden=True, layer_mix=1)[source]
update_aux(self, data, vector_labels, train_index, opt)[source]
update_soft(self, data, labels, train_index)[source]
loss(self, data, opt)[source]
predict_noise(self, data, tau=1)[source]
class cogdl.models.nn.pyg_gcnmix.GCNMix(in_feat, hidden_size, num_classes, k, temperature, alpha, rampup_starts, rampup_ends, final_consistency_weight, ema_decay, dropout)[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.

forward(self, x, edge_index)[source]
forward_ema(self, x, edge_index)[source]
loss(self, data)[source]
predict(self, data)[source]