生信喵 发表于 2024-3-13 15:42:26

按元素相乘是什么

看到⊙: 按元素相乘,这个符号,原来是下图中的意思。

首先保证矩阵的结构相同,把对应位置的数值相乘。举个例子如下:
![按元素相乘.png](data/attachment/forum/202403/13/154133qh37ym73fx7z47ny.png "按元素相乘.png")

生信喵 发表于 2025-1-10 12:03:17

<p>类似数组相乘,每一维数目一致,“*”每一个元素相乘</p>

KingNie 发表于 2026-7-31 16:10:34

本帖最后由 KingNie 于 2026-7-31 16:14 编辑

That's a very clear summary! To add a term from linear algebra, this element-wise multiplication is also called the "Hadamard product" in mathematics. In Python's NumPy or PyTorch, as long as the dimensions match (or broadcasting is possible), using the * operator will produce the same effect.

Regards, capcut pro

页: [1]
查看完整版本: 按元素相乘是什么