(self, nfeat, nhid, nclass, dropout, alpha, nheads)
Dense version of GAT.
Dense version of GAT.
Dense version of GAT .
def __init__(self, nfeat, nhid, nclass, dropout, alpha, nheads):
        """Dense version of GAT."""
        super(GAT, self).__init__()
        self.dropout = dropout

        self.attentions = [GraphAttentionLayer(nfeat, nhid, dropout=dropout, alpha=alpha, concat=True) for _ in range(nheads)]
        for i, attention in enumerate(self.attentions):
            self.add_module('attention_{}'.format(i), attention)

        self.out_att = GraphAttentionLayer(nhid * nheads, nclass, dropout=dropout, alpha=alpha, concat=False)
def __init__ ( self , nfeat , nhid , nclass , dropout , alpha , nheads ) : super ( GAT , self ) . __init__ ( ) self . dropout = dropout self . attentions = [ GraphAttentionLayer ( nfeat , nhid , dropout = dropout , alpha = alpha , concat = True ) for _ in range ( nheads ) ] for i , attention in enumerate ( self . attentions ) : self . add_module ( 'attention_{}' . format ( i ) , attention ) self . out_att = GraphAttentionLayer ( nhid * nheads , nclass , dropout = dropout , alpha = alpha , concat = False )