Based on your second code snippet it seems text is already a tensor, so I’m unsure, why you would want to use torch.cat on it again.
Anyway, the inputs to torch.cat should be a tuple of tensors, so you would have to use torch.cat((text,)).
However, this won’t change the shape of text, since it’s already a single tensor.