The input shapes should work, as seen in this code snippet:
a = torch.log_softmax(torch.randn(64, 81), dim=1)
b = torch.softmax(torch.randn(64, 81), dim=1)
criterion = nn.KLDivLoss()

loss = criterion(a, b)

Could you post an executable code snippet to reproduce this issue?