Brando_Miranda:

whats wrong with this solution…?


I don’t see anything wrong with your approach, but as described in the other topic, you could use torch.stack instead of transforming the tensors to numpy arrays and call torch.as_tensor.
Nested tensors would allow you to create a tensor object containing tensors with different shapes, which doesn’t seem to be the use case you are working on.