I see! Thanks for replying! 
I will read about all that suggestions!
Just trying some tests, I am trying to convert a tensor like this:
‘’’
1)
tensor([[[ 1., 20.],
         [ 2., 21.],
         [ 3., 22.],
         [ 4., 23.]],

        [[ 5., 24.],
         [ 6., 25.],
         [ 7., 26.],
         [ 8., 27.]],

        [[ 9., 28.],
         [10., 29.],
         [11., 30.],
         [12., 31.]]])

To something like this:
2)
tensor([[ 1., 5., 9.],
        [ 2., 6., 10.],
        [ 3., 7., 11.],
	    [ 4., 8., 12.],
	    [ 20., 24., 28.],
	    [ 21., 25., 29.],
	    [ 22., 26., 30.],
	    [ 23., 27., 31.]])

Each line in the second tensor corresponds to (x,y) element of the first tensor.
The list of values of each line in the second tensor corresponds to the values in the first tensor through layers direction.
Could you help me with this? I am trying using transpose() and reshape() but I am not doing it correctly.