当前位置:主页 > 软件编程 > Python代码 >

pytorch中tensor的合并与截取方法

时间:2021-05-03 10:03:47 | 栏目:Python代码 | 点击:

合并:

torch.cat(inputs=(a, b), dimension=1)

e.g. x = torch.cat((x,y), 0) 沿x轴合并

截取:

x[:, 2:4]

您可能感兴趣的文章:

相关文章