The reshape or view operation will interleave the image in case you want to transform the memory layout from channels-last to channels-first.
Use tensor.permute instead, which permutes the dimensions.