mathtensorflowdeep-learningkerastheano

How is Hard Sigmoid defined


I am working on Deep Nets using keras. There is an activation "hard sigmoid". Whats its mathematical definition ?

I know what is Sigmoid. Someone asked similar question on Quora: https://www.quora.com/What-is-hard-sigmoid-in-artificial-neural-networks-Why-is-it-faster-than-standard-sigmoid-Are-there-any-disadvantages-over-the-standard-sigmoid

But I could not find the precise mathematical definition anywhere ?


Solution

  • it is

      clip((x + 1)/2, 0, 1) 
    

    in coding parlance:

      max(0, min(1, (x + 1)/2))