Hi,
If you could post code to reproduce your problem, it would be easier for us to find the problem.
Also, with images, when you want to change the order of the dimensions, you should use the permute function instead of the view function. This small example shows the difference between the two:
    x = torch.rand(size=(4, 4, 3), dtype=torch.float32)
    print(x)
    # tensor([[[0.0136, 0.6666, 0.5414],
    #          [0.8499, 0.6427, 0.8142],
    #          [0.9565, 0.4752, 0.0079],
    #          [0.5476, 0.2150, 0.9677]],
    # 
    #         [[0.9483, 0.6250, 0.1009],
    #          [0.8543, 0.1606, 0.0530],
    #          [0.7296, 0.6276, 0.1459],
    #          [0.0894, 0.5672, 0.2201]],
    # 
    #         [[0.1019, 0.4461, 0.1278],
    #          [0.6479, 0.5163, 0.2692],
    #          [0.3704, 0.4845, 0.1759],
    #          [0.2597, 0.6056, 0.2702]],
    # 
    #         [[0.4689, 0.0948, 0.3193],
    #          [0.0574, 0.1467, 0.2993],
    #          [0.8013, 0.7025, 0.2048],
    #          [0.0281, 0.9036, 0.0024]]])
    y = x.view(3, 4, 4)
    z = x.permute(dims=(2, 0, 1))
    print(y)
    # tensor([[[0.0136, 0.6666, 0.5414, 0.8499],
    #          [0.6427, 0.8142, 0.9565, 0.4752],
    #          [0.0079, 0.5476, 0.2150, 0.9677],
    #          [0.9483, 0.6250, 0.1009, 0.8543]],
    # 
    #         [[0.1606, 0.0530, 0.7296, 0.6276],
    #          [0.1459, 0.0894, 0.5672, 0.2201],
    #          [0.1019, 0.4461, 0.1278, 0.6479],
    #          [0.5163, 0.2692, 0.3704, 0.4845]],
    # 
    #         [[0.1759, 0.2597, 0.6056, 0.2702],
    #          [0.4689, 0.0948, 0.3193, 0.0574],
    #          [0.1467, 0.2993, 0.8013, 0.7025],
    #          [0.2048, 0.0281, 0.9036, 0.0024]]])
    print(z)
    # tensor([[[0.0136, 0.8499, 0.9565, 0.5476],
    #          [0.9483, 0.8543, 0.7296, 0.0894],
    #          [0.1019, 0.6479, 0.3704, 0.2597],
    #          [0.4689, 0.0574, 0.8013, 0.0281]],
    # 
    #         [[0.6666, 0.6427, 0.4752, 0.2150],
    #          [0.6250, 0.1606, 0.6276, 0.5672],
    #          [0.4461, 0.5163, 0.4845, 0.6056],
    #          [0.0948, 0.1467, 0.7025, 0.9036]],
    # 
    #         [[0.5414, 0.8142, 0.0079, 0.9677],
    #          [0.1009, 0.0530, 0.1459, 0.2201],
    #          [0.1278, 0.2692, 0.1759, 0.2702],
    #          [0.3193, 0.2993, 0.2048, 0.0024]]])