torch常用函数(持续更新)

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按行“拼在一起”。

猜你喜欢

转载自blog.csdn.net/qq_44721124/article/details/103694509