在機器學習問題中,模型訓練的核心是梯度下降: 計算損失函數(Loss Function) 計算損失對參數的導數(Gradient) 根據梯度更新參數 重復直到收斂 我們需要找到一個高效的梯度計算方法。 幾種梯度計算方法 梯度計算方法包括:數值微分、符號微分、自動微分 1. 數值微分 數值微分的基本思想,是使用一個非常小的 $h$ 去近似計算。 但是,這種計算方法存在舍入誤差,而且計算復雜度高。 如…
Louis Aeilot's Blog 的其他文章
- How Close Is FlashAttention to the Limit? Understanding Attention Through Data Movement
- Beyond FLOPs: How COSMA Builds Parallel Matrix Multiplication from Communication Bounds
- The Red-Blue Pebble Game: Why Faster Processors Still Have to Move Data
- Git Needs a Trash Can
- RoPE: Properties, Patterns, and Long-Context Behavior
讨论
登录后参与讨论
还没有评论,来说第一句吧。