Hello OG!
I think your root issue is that pytorch models operate on tensors that
carry a leading nBatch dimension that is not directly referenced in
the model architecture.



 Mr_OG:

I cant apply nn.Softmax() along each dimension separately.
…
adding my net architecture:
    self.fc1 = nn.Linear(4, 6)



Such a model will operate on a tensor of shape [nBatch, 4].
(If you want to pass in a single sample of shape [4], you have to
unsqueeze() it to get a tensor with a leading singleton dimension,
that is, of shape [1, 4].)


    self.fc9 = nn.Linear(6, 4)

…
    x = F.relu(self.fc9(x))



The output of this model will have shape [nBatch, 4] (rather than
shape [4]).


    # x = x.view(2, 2)



You probably commented out this line because it didn’t work.  It doesn’t
work because your view() call doesn’t take into account x's nBatch
dimension.
Regardless, your basic idea does work.  The sample script, below,
shows, step by step, how you can use view() to group your four
values into two sets of two, apply softmax() to the two sets of two
separately, and then use view() again to reorganize your two sets
of two back into one set of four.  But we have to account for the
leading nBatch dimension.
Here is a pytorch 0.3.0 version of the script:
import torch
torch.__version__

x = torch.autograd.Variable (torch.randn ((3, 4)))    # assume nBatch = 3
x
v = x.view (-1, 2, 2)   # use -1 to "infer" size of nBatch dimension
v
sm = torch.nn.functional.softmax (v, dim = -1)        # -1 to perform softmax over last dimension = 2
sm
y = sm.view (-1, 4)     # use -1 to "infer" size of nBatch dimension
y
sm.sum (dim = -1)       # check softmax sum (-1 to sum over last dimension = 2)
y.sum (dim = -1)        # check softmax sum (-1 to sum over last dimension = 1)

Here is the output:
>>> import torch
>>> torch.__version__
'0.3.0b0+591e73e'
>>>
>>> x = torch.autograd.Variable (torch.randn ((3, 4)))    # assume nBatch = 3
>>> x
Variable containing:
-2.2293  2.3681  0.5411 -1.3360
 0.7701 -1.1548  0.2012 -0.6301
-0.0882 -0.1200 -0.4608  0.9952
[torch.FloatTensor of size 3x4]

>>> v = x.view (-1, 2, 2)   # use -1 to "infer" size of nBatch dimension
>>> v
Variable containing:
(0 ,.,.) =
 -2.2293  2.3681
  0.5411 -1.3360

(1 ,.,.) =
  0.7701 -1.1548
  0.2012 -0.6301

(2 ,.,.) =
 -0.0882 -0.1200
 -0.4608  0.9952
[torch.FloatTensor of size 3x2x2]

>>> sm = torch.nn.functional.softmax (v, dim = -1)        # -1 to perform softmax over last dimension = 2
>>> sm
Variable containing:
(0 ,.,.) =
  0.0100  0.9900
  0.8673  0.1327

(1 ,.,.) =
  0.8727  0.1273
  0.6966  0.3034

(2 ,.,.) =
  0.5079  0.4921
  0.1891  0.8109
[torch.FloatTensor of size 3x2x2]

>>> y = sm.view (-1, 4)     # use -1 to "infer" size of nBatch dimension
>>> y
Variable containing:
 0.0100  0.9900  0.8673  0.1327
 0.8727  0.1273  0.6966  0.3034
 0.5079  0.4921  0.1891  0.8109
[torch.FloatTensor of size 3x4]

>>> sm.sum (dim = -1)       # check softmax sum (-1 to sum over last dimension = 2)
Variable containing:
 1  1
 1  1
 1  1
[torch.FloatTensor of size 3x2]

>>> y.sum (dim = -1)        # check softmax sum (-1 to sum over last dimension = 1)
Variable containing:
 2
 2
 2
[torch.FloatTensor of size 3]

Best.
K. Frank