I don’t know what memory layout nib uses, but I would guess it’s channels-last (same as OpenCV)?
If so, you are interleaving the images most likely via:
images[135].reshape(1, 4, 256, 160)

and should change it to a tensor.permute or numpy_array.transpose if you want to change the dimension order.