如何将向量转换为矩阵,每条线等于pytorch中的向量?

问题描述 投票:2回答:1

例如,我有矢量qazxsw poi

我想得到一个像矩阵

[1, 2, 3]

如何有效地做到这一点?

machine-learning pytorch
1个回答
2
投票

你应该看看[[1, 2, 3], [1, 2, 3], [1, 2, 3], [1, 2, 3]]

.repeat()
© www.soinside.com 2019 - 2024. All rights reserved.