1. torch.cat() a = torch.ones([1, 2]) b = torch.ones([1, 2]) c = torch.cat([a, b], 1) cat的第二个参数为1时,就是将a,b按列“拼在一起”,同于增广矩阵。 当参数为0时,将a,b按行“拼在一起”。