File size: 138 Bytes
42dc111
 
 
 
1
2
3
4
5
from __future__ import annotations
import math
def from_loss(loss: float) -> float:
    return math.exp(min(max(float(loss), 0.0), 20.0))