Igo312:

[[[1,1],[1,1]],
[[2,2],[2,2]],
[[3,3],[3,3]],
[[4,4],[4,4]]]



I get what @ptrblck  mean. here’s my new example
       # first element of batch
       [[[[1.1,1.2],[1.3,1.4]],
        [[2.1,2.2],[2.3,2.4]],
        [[3.1,3.2],[3.3,3.4]],
        [[4.1,4.2],[4.3,4.4]]],
       #  second element of batch
         [[[5.1,5.2],[5.3,5.4]],
        [[6.1,6.2],[6.3,6.4]],
        [[7.1,7.2],[7.3,7.4]],
        [[8.1,8.2],[8.3,8.4]]]]

And if I use
N,C,H,W = a.size()
x.view(N,C//2,C//2,H,W).permute(0,1,3,2,4).contiguous().view(N,C//4,H*2,W*2)

it will return
tensor([[[[1.1000, 1.2000, 2.1000, 2.2000],
          [1.3000, 1.4000, 2.3000, 2.4000],
          [3.1000, 3.2000, 4.1000, 4.2000],
          [3.3000, 3.4000, 4.3000, 4.4000]]],
        [[[5.1000, 5.2000, 6.1000, 6.2000],
          [5.3000, 5.4000, 6.3000, 6.4000],
          [7.1000, 7.2000, 8.1000, 8.2000],
          [7.3000, 7.4000, 8.3000, 8.4000]]]])