How can implement a function similar to $ \ln \bigl( \frac{1}{1+e^{-x}} \bigl) $
It should be below piecewise function and should be differentiable
f(n) = \begin{cases} x, & \text{if $x$ < 100} \\ \to 100, & \text{otherwise} \end{cases}
I need this function to implement a differentiable activation function in pytorch. I tried functions like below, which didn't help

