The output size is defined by your conv and max pool layers.
Your last Conv2d layer has a kernel size of 1, and padding=1, which adds 2 pixels to the height and width of your activation volume.
So if your activation from layer30 is [batch_size, 512, 13, 13], your final layer will result in [batch_size, 169, 15, 15].
x = torch.randn(1, 512, 13, 13)
m = nn.Conv2d(in_channels=512,
              out_channels=169,
              kernel_size=1,
              stride=1,
              padding=1)
x = m(x)
print(x.shape)
> torch.Size([1, 169, 15, 15])

If you want the output to be [batch_size, 169, 1, 1], you should use a conv layer with kernel_size=13, stride=1, padding=0.