Yes, this would yield an output of [batch_size, 256, 1, 1].
x = torch.randn(1, 128, 6, 6)
conv = nn.Conv2d(128, 256, 8, stride=1, padding=1)
output = conv(x)
print(output.shape)
> torch.Size([1, 256, 1, 1])