gammagl.models.Specformer

class Specformer(nclass, n_feat, n_layer=2, hidden_dim=32, n_heads=4, tran_dropout=0.2, feat_dropout=0.4, prop_dropout=0.5, norm='none')[source]

The Specformer from the “Specformer:Spectral Graph Neural Networks Meet Transformers” paper

Parameters:
  • nclass (int) – the number of node classes

  • n_feat (int) – the node feature input dimension

  • n_layer (int) – number of Speclayers

  • hidden_dim (int) – the eigvalue representation dimension and the node feature dimension

  • n_heads (int) – the number of attention heads

  • tran_dropout (int) – the probability of dropout

  • feat_dropout (int) – the probability of dropout

  • prop_dropout (float) – the probability of dropout

forward(x, edge_index, e, u)[source]