您的位置: 首页 > 文章 > pytorch矩阵相乘matmul,mm pytorch矩阵相乘matmul,mm 分类: 文章 • 2024-10-19 19:16:46 注意:torch.mm和转置(.t())只是适用于2维矩阵,推荐使用torch.matmul(等价于@) 多维度数据的转置使用的是transpose或者permute。 matmul:只取后两个维度进行相乘。符合broadcast机制的可以相乘。