Skip to main content

temperature_scaled_softmax

Function temperature_scaled_softmax 

Source
pub fn temperature_scaled_softmax(logits: &[f64], temperature: f64) -> Vec<f64>
Expand description

細分類のロジットに温度スケーリングを適用した上で Softmax を計算する。

§引数

  • logits: 第 2 パスで得られた未正規化ロジット。
  • temperature: スケーリング温度 ($T \ge 1.0$)。