Hello,
thanks for your clarification.
but it still does not answer my question.
lets look at a simpler example here:
A =Variable(torch.rand(1,1,3,3))
print(A)

Variable containing:
(0 ,0 ,.,.) = 
  0.7806  0.2611  0.7685
  0.3393  0.4488  0.0576
  0.8112  0.4408  0.6531
[torch.FloatTensor of size 1x1x3x3]

how can i apply softmax to tensor A in a way that the sum of values be 1?
if i do
F.softmax((A), dim=1)
or
F.softmax((A), dim=0)
it will gives me
(0 ,0 ,.,.) = 
  1  1  1
  1  1  1
  1  1  1
[torch.FloatTensor of size 1x1x3x3]

please note that i used channel =1  for simplicity. my channels will be more than 1 and i want to appl softmax to each channel of the tensor in a way that the values of each channel be 1 after the softmax