Using 5d tensor in Pytorch-Android

I have a model that takes (Batch Size, Channel, Number of images, Height, and Width) as input and produces the output. I am trying to get that model working in Android.

For this, I am taking two images as input, each of the dimensions (C, H, W). Now I must concatenate the two images and include a batch size of 1. Is there a way to do this in Android using Pytorch? Both cat and resize don’t seem to work in torch. Is there another way to do it?

Example:
Image1 Shape : (3, 190, 640) (given)
Image2 Shape : (3, 190, 640) (given)
Concatenated Image Shape : (2, 3, 190, 640) (need to do)
Reshaped Image Shape : (3, 2, 190, 640) (need to do)
Added batch size : (1, 3, 2, 190, 640) (need to do)

Is there a way to achieve this using pytorch-android version?