24 lines
854 B
Python
24 lines
854 B
Python
import torch.nn as nn
|
|
|
|
class SISUDiscriminator(nn.Module):
|
|
def __init__(self):
|
|
super(SISUDiscriminator, self).__init__()
|
|
self.model = nn.Sequential(
|
|
nn.Conv1d(2, 64, kernel_size=4, stride=2, padding=1), # Now accepts 2 input channels
|
|
nn.LeakyReLU(0.2),
|
|
nn.Conv1d(64, 128, kernel_size=4, stride=2, padding=1),
|
|
nn.BatchNorm1d(128),
|
|
nn.LeakyReLU(0.2),
|
|
nn.Conv1d(128, 256, kernel_size=4, stride=2, padding=1),
|
|
nn.BatchNorm1d(256),
|
|
nn.LeakyReLU(0.2),
|
|
nn.Conv1d(256, 512, kernel_size=4, stride=2, padding=1),
|
|
nn.BatchNorm1d(512),
|
|
nn.LeakyReLU(0.2),
|
|
nn.Conv1d(512, 1, kernel_size=4, stride=1, padding=0),
|
|
nn.Sigmoid()
|
|
)
|
|
|
|
def forward(self, x):
|
|
return self.model(x)
|