I think it was the default format in LuaTorch and I don’t know, why this format was preferred over NHWC.
However, note that PyTorch has now experimental channels-last support 163. By using this, you would still create and index the tensors as NCHW to guarantee backwards compatibility.