/
mlpGCN.py
31 lines (30 loc) · 934 Bytes
/
mlpGCN.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pdb
import torch
from torch import nn
import torch.nn.functional as F
from torch.nn import Sequential, Linear, ReLU, Dropout, LeakyReLU
from GCNModel import NetBA
class Classifier(nn.Module):
def __init__(self):
super(Classifier,self).__init__()
self.layer_BA = NetBA()
#self.layer_LTL = NetBA(in_channels=62)
self.dropout = 0.1
self.layers = Sequential(
#nn.Flatten(),
Linear(256, 64),
ReLU(),
#Dropout(p=0.5),
Linear(64, 1)
)
self.layerLink = Sequential(
Linear(128,64),
ReLU(),
Linear(64,1)
)
def forward(self, dataBA,num_nodes, num_edges, start_node, gid, checkStatus):
'''Forward pass'''
outBA = self.layer_BA(dataBA)
x = outBA
x = self.layerLink(x)
return x