I don’t think there is any other valid approach besides manually looping over the dict/list or padding all tensors.
Nested tensors should solve this issue and might provide a clean way without padding. The progress can be tracked here 6.