The class of my last convolution layer is this (basically I use it for converting a n features layer to a single feature (intensity) image):

class SingleConv1x1(nn.Module):
def init(self, in_feat, dropout):
super(SingleConv1x1, self).init()
    self.conv1 = nn.Sequential(nn.Conv2d(in_feat, 1,
                               kernel_size=1,
                               stride=1,
                               padding=0),
                               nn.Dropout2d(dropout))

def forward(self, inputs):
    outputs = self.conv1(inputs)

    return outputs


After the dropout I would put the linear activation function.
Thank you.
Paolo