Hi,
What is the syntax error here? How should I modify it?
class Classifier(nn.Module):
def __init__(self, input_nc):
super(Classifier, self).__init__()
self.classifier = nn.Sequential(
# batch_size x input_nc x 256 x 256
nn.Conv2d(input_nc, 32, kernel_size=5, stride=2, padding=2),
nn.ReLU(True),
# batch_size x 32 x 128 x 128
nn.MaxPool2d(kernel_size=2, stride=2, padding=0)
# batch_size x 32 x 64 x 64
nn.Conv2d(32, 64, kernel_size=5, stride=2, padding=2),
nn.ReLU(True),
# batch_size x 64 x 32 x 32
nn.MaxPool2d(kernel_size=2, stride=2, padding=0),
# batch_size x 64 x 16 x 16
nn.Conv2d(64, 128, kernel_size=5, stride=2, padding=2),
nn.ReLU(True),
# batch_size x 128 x 8 x 8
nn.MaxPool2d(kernel_size=2, stride=2, padding=0),
# batch_size x 128 x 4 x 4
nn.Linear(2048, 512),
nn.ReLU(True),
# batch_size x 512
nn.Linear(512, 128),
nn.ReLU(True),
# batch_size x 128
nn.Linear(128, 3)
)