mapillary/inplace_abn

Feature request: Support Sigmoid activation function

jasam-sheja opened this issue · 1 comments

The sigmoid function is used in many networks, and it is beneficial to have an activated batch norm with the sigmoid function.
Sigmoid is also invertible.
If
y =  1/(1+e^{-x})
then
x = ln(y/(1-y)) = -ln((1-y)/y)
and
dy/dx =  y(1-y)

If you think this is a good idea, I'd like to contribute it to this repo.

Thanks :)

Never mind, the sigmoid inverse is numerically unstable for positive numbers.
This use case is limited to inputs restricted to be smaller than some positive number under 100 depending on precision.
Unless there is a stable inverse for sigmoid, this won't be useful.