The output of the nn.Softmax(dim=1) layer will sum to 1 in the specified dimension as seen here:
x = torch.randn(10, 10, 10, 10)
smax = nn.Softmax(dim=1)
out = smax(x)
print(out.sum())
> tensor(1000.)
print(out.sum(dim=1)) # ones