Exemple #1
0
 def __init__(self):
     super(Net, self).__init__()
     self.conv1 = GraphConv(dataset.num_features, 32)
     self.conv2 = GraphConv(32, 64)
     self.conv3 = GraphConv(64, 64)
     self.fc1 = torch.nn.Linear(64, 64)
     self.fc2 = torch.nn.Linear(64, 32)
     self.fc3 = torch.nn.Linear(32, dataset.num_classes)
Exemple #2
0
    def __init__(self):
        super(Net, self).__init__()
        # This is the update step
        self.conv1 = GraphConv(dataset.num_features, 32)
        self.conv2 = GraphConv(32, 64)
        self.conv3 = GraphConv(64, 64)

        # The transforms the update step into something usable
        self.fc1 = torch.nn.Linear(64, 64)
        self.fc2 = torch.nn.Linear(64, 32)
        self.fc3 = torch.nn.Linear(32, dataset.num_classes)
Exemple #3
0
    def __init__(self):
        super(Net, self).__init__()
        M_in, M_out = dataset.num_features, 32
        nn1 = Sequential(Linear(5, 128), ReLU(), Linear(128, M_in * M_out))
        self.conv1 = NNConv(M_in, M_out, nn1)

        M_in, M_out = M_out, 64
        nn2 = Sequential(Linear(5, 128), ReLU(), Linear(128, M_in * M_out))
        self.conv2 = NNConv(M_in, M_out, nn2)

        M_in, M_out = M_out, 64
        nn3 = Sequential(Linear(5, 128), ReLU(), Linear(128, M_in * M_out))
        self.conv3 = NNConv(M_in, M_out, nn3)

        self.conv6 = GraphConv(64 + num_i_3, 64)
        self.conv7 = GraphConv(64, 64)

        self.fc1 = torch.nn.Linear(2 * 64, 64)
        self.fc2 = torch.nn.Linear(64, 32)
        self.fc3 = torch.nn.Linear(32, 1)
 def __init__(self,config,args):
     super(Net, self).__init__()
     self.conv1 = GraphConv(config.num_features, 64)
     self.conv2 = GraphConv(64, 64)
     self.conv3 = GraphConv(64, 64)
     self.conv4 = GraphConv(64 + config.num_i_2, 64)
     self.conv5 = GraphConv(64, 64)
     self.conv6 = GraphConv(64 + config.num_i_3, 64)
     self.conv7 = GraphConv(64, 64)
     self.fc1 = torch.nn.Linear(3 * 64, 64)
     self.fc2 = torch.nn.Linear(64, 32)
     self.fc3 = torch.nn.Linear(32, 1)
     if args.type=="TU":
         self.fc3 = torch.nn.Linear(32, config.num_classes)
     self.args=args
     self.sigmoid = nn.Sigmoid()