Usually, there is a fully connected layer after the last conv layer which maps the output to the number of categories. You are talking about sigmoid function so I assume there are only 2 classes and only 1 output value is needed. In this case, the code should be something like:
conv_out = torch.ones((1,1,2048))

# map dim 2048 to 1 using a linear transformation.
fc = nn.Linear(2048, 1)
fc_out = fc(conv_out)

# apply sigmoid function to fc_out to get the probability. 
y_prob = torch.sigmoid(fc_out)

print(y_prob)