IQ.Pilot Prebuilt Release @ 27f668a
This commit is contained in:
9
iqpilot/selfdrive/dmonitoringmodeld/math.py
Normal file
9
iqpilot/selfdrive/dmonitoringmodeld/math.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import numpy as np
|
||||
|
||||
|
||||
def safe_exp(values, out=None):
|
||||
return np.exp(np.clip(values, -np.inf, 11), out=out)
|
||||
|
||||
|
||||
def sigmoid(values):
|
||||
return 1.0 / (1.0 + safe_exp(-values))
|
||||
Reference in New Issue
Block a user