import torch a = [torch.arange(12).reshape(3, 4)] print(a) b = torch.cat(a, dim=0) print(b)
使用torch.cat去除[]