You are right, the following test shows that data from channel 1 can be placed in channel 0
>>> img = torch.rand(4,3,8,8)
>>> img_to_batch(img,4)[4,0]
tensor([[0.4258, 0.3276, 0.8221, 0.6588],
        [0.5438, 0.9239, 0.0490, 0.7193],
        [0.5852, 0.7115, 0.0703, 0.1770],
        [0.4305, 0.4190, 0.2891, 0.0326]])
>>> img[0,1]
tensor([[0.4258, 0.3276, 0.8221, 0.6588, 0.9918, 0.6219, 0.4951, 0.4356],
        [0.5438, 0.9239, 0.0490, 0.7193, 0.6819, 0.0627, 0.0361, 0.3178],
        [0.5852, 0.7115, 0.0703, 0.1770, 0.3855, 0.0666, 0.7337, 0.0240],
        [0.4305, 0.4190, 0.2891, 0.0326, 0.3457, 0.7378, 0.5640, 0.7104],
        [0.3787, 0.2371, 0.4585, 0.6150, 0.7169, 0.6518, 0.4671, 0.1212],
        [0.8061, 0.4295, 0.1194, 0.7166, 0.7526, 0.8067, 0.1612, 0.2812],
        [0.3896, 0.8208, 0.5835, 0.6830, 0.0191, 0.7138, 0.9124, 0.7285],
        [0.0963, 0.4236, 0.2779, 0.8006, 0.1528, 0.5168, 0.6543, 0.7928]])