torch cat用法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/jacke121/article/details/83031466
import torch

a= torch.FloatTensor([1,0,1])
b=torch.FloatTensor([0,0,1])

c=torch.cat((a.unsqueeze(0),b.unsqueeze(0)),0)
print(c)

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/83031466
今日推荐