I have two cv:Mat files: image1, image2, with same resolution.
if copy separately, it is easy to do as below:
torch::Tensor tensor1 = torch::from_blob (image1.data, { 1, 1, image1.rows, image1.cols });
However, how can I load the two images such that tensor1 has size { 1, 2, image1.rows, image1.cols }?