To “combine” values you could either use torch.cat or torch.stack, which will concatenate the subtensors in a specified dimension or a new one.
I’m not sure, if this is what you are looking for exactly.