You could return one tensor containing all the information (like the concatenation of tensor1 and tensor2), and then use view or narrow to retrieve the relevant tensor.
Hi @Hartbook, could you give an example?
What if the shape of tensors are different. How to retrieve or partition the returned single tensor?
Thank you very much.