知识卡片
矩阵梯度采用转置布局
本书对N×M矩阵W的标量损失导数采用M×N的转置布局,元素位置与常见同形梯度记法不同。这让后续特定矩阵链规则更简洁,但不是唯一正确约定。实现时需根据库返回的实际形状作对应,不能看到转置就判断公式或代码错误。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
Finally, if W is an [N × M] dimensional matrix, and L is a scalar, then the gradient is represented as an [M × N] dimensional matrix (note that the dimensions are transposed from what you might have expected; this makes the math simpler later):
参考来源
- 位置:《Foundations of Computer Vision (Antonio Torralba, Phillip Isola etc.)》符号约定专题《符号与矩阵微积分约定》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Foundations of Computer Vision (Antonio Torralba, Phillip Isola etc.)/_epub-src/OPS/xhtml/c000b.xhtml)
- 结论依据:摘录中关于矩阵梯度采用转置布局的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:Finally, if W is an [N × M] dimensional matrix, and L is a scalar, then the gradient is represented as an [M × N] dimensional matrix (note that the dimensions are transposed from what you might have expected; this makes the math simpler later):