The difference between sigmoid and tanh

Jimmy (xiaoke) Shen
2 min readApr 17, 2020

--

Sigmoid function and tanh function are two activation functions used in deep learning. Also, they look very similar to each other. In this article, I’d like to have a quick comparison.

Sigmoid function

tanh function

Difference

The difference can be seen from the picture below. Sigmoid function has a range of 0 to 1, while tanh function has a range of -1 to 1. “In fact, tanh function is a scaled sigmoid function!”

The red one is sigmoid and the green one is the tanh function

Reference

https://medium.com/the-theory-of-everything/understanding-activation-functions-in-neural-networks-9491262884e0

--

--

Jimmy (xiaoke) Shen
Jimmy (xiaoke) Shen

No responses yet