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]





合并:
torch.cat(inputs=(a, b), dimension=1) e.g. x = torch.cat((x,y), 0) 沿x轴合并
截取:
x[:, 2:4]


