摘要: torch.mul作element-wise的矩阵点乘,维数不限,可以矩阵乘标量 点乘都是broadcast的,可以用 torch.mul(a, b) 实现,也可以直接用 * 实现。 当a, b维度不一致时,会自动填充到相同维度相点乘。 1 import torch 2 3 a = torch.on 阅读全文
posted @ 2021-02-23 22:39 vv_869 阅读(7045) 评论(0) 推荐(1)