Hi,
I have a tensor and I want to calculate softmax along the rows of the tensor.

action_values  = t.tensor([[-0.4001, -0.2948,  0.1288]])

as I understand cutting the tensor row-wise we need to specify dim as 1.
However I got an unexpected result.
can someone please help me in understanding how softmax and dim in softmax works.
Below is what I tried, but none gave me successful results.

F.softmax(action_values - max(action_values), dim = 0)
Out[15]: tensor([[1., 1., 1.]])
F.softmax(action_values - max(action_values), dim = 1)
Out[16]: tensor([[0.3333, 0.3333, 0.3333]])
F.softmax(action_values - max(action_values), dim = -1)
Out[17]: tensor([[0.3333, 0.3333, 0.3333]])