I am trying to implement the following softplus function:
log(1 + exp(x))
I\'ve tried it with math/numpy and float64 as data type, but whenever
i use this code to work in arrays
def safe_softplus(x): inRanges = (x < 100) return np.log(1 + np.exp(x*inRanges))*inRanges + x*(1-inRanges)