Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将 Python 代码移植到 C++ 中,我遇到了这个问题:在 Python 中将形状张量(5, 3, 10)转换为形状(10, 5, 3)我可以使用以下函数:
(5, 3, 10)
(10, 5, 3)
np.transpose(tensor, (2, 0, 1))
如何使用标准库或任何线性代数库(如 Eigen)在 C++ 中执行相同的操作