ts-playground
    Preparing search index...

    Function softmaxWithTemperature

    • Softmax with temperature function https://en.wikipedia.org/wiki/Softmax_function When the weights are empty, it returns an empty array.

      Parameters

      • weights: number[]
      • temperature: number

        must be a positive finite number (temperature > 0)

      Returns number[]

      array of probabilities

      if temperature is not a positive finite number