pytorch如何将装有tensor的list转成高维tensor

https://stackoverflow.com/questions/55050717/converting-list-of-tensors-to-tensors-pytorch
利用pad_sequence还可以将不同长度的tensor合并到一起:

from torch.nn.utils.rnn import pad_sequence
a = torch.ones(25, 300)
b = torch.ones(22, 300)
c 

你可能感兴趣的:(机器学习,pytorch,list,tensor)