◼️GNN

    PyTorch의 신경망을 구성할 때 사용되는 기본 클래스 nn.Model & SGNN

    class SGNN(nn.Module): # nn.Module을 상속받음으로써 PyTorch의 신경망 구조로 동작 def __init__(self, in_feats, hidden_feats, out_feats): super(SGNN, self).__init__() # nn.Module의 생성자를 호출하여 초기화 self.layer1 = SGNNLayer(in_feats, hidden_feats) # 첫 번째 레이어 self.layer2 = SGNNLayer(hidden_feats, out_feats) # 두 번째 레이어 def forward(self, graph): # forward 메서드는 순전파 로직을 정의 h = graph.nda..