| 9 | from torchinfo import summary |
| 10 | |
| 11 | class Discrimiantor(torch.nn.Module): |
| 12 | def __init__(self,in_features = 128): |
| 13 | super(Discrimiantor, self).__init__() |
| 14 | self.dense = torch.nn.Sequential( |
| 15 | torch.nn.Linear(in_features = in_features,out_features=256), |
| 16 | torch.nn.ReLU(), |
| 17 | |
| 18 | torch.nn.Linear(in_features=256,out_features=512), |
| 19 | torch.nn.ReLU(), |
| 20 | |
| 21 | torch.nn.Linear(in_features = 512,out_features=256), |
| 22 | torch.nn.ReLU(), |
| 23 | |
| 24 | torch.nn.Linear(in_features = 256,out_features=128), |
| 25 | torch.nn.ReLU(), |
| 26 | |
| 27 | torch.nn.Linear(in_features = 128,out_features=1), |
| 28 | torch.nn.Sigmoid() |
| 29 | ) |
| 30 | def forward(self,x): |
| 31 | out = self.dense(x) |
| 32 | return out |
| 33 | |
| 34 | if __name__ == '__main__': |
| 35 | model = Discrimiantor(in_features=128) |
no outgoing calls
no test coverage detected