UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument

I got the following warning. Does anybody know how to fix it? Thanks.

$ cat main.py
#!/usr/bin/env python

import torch
import torch.nn as nn
import torch.autograd as autograd

m = nn.LogSoftmax()
input = autograd.Variable(torch.randn(2, 3))
print(input)
print(m(input))
$ ./main.py
Variable containing:
0.5502 1.2458 1.9163
-2.0801 -0.3751 1.2297
[torch.FloatTensor of size 2x3]

./main.py:11: UserWarning: Implicit dimension choice for log_softmax has been deprecated. Change the call to include dim=X as an argument.
print(m(input))
Variable containing:
-1.9351 -1.2396 -0.5690
-3.5229 -1.8178 -0.2131
[torch.FloatTensor of size 2x3]

You should specify dimension in which softmax will be applied in LogSoftmax(). So you need to specify dim argument: m = nn.LogSoftmax(dim=1) for example.