Posts

Tanh / Hyperbolic Tangent Activation Function

Image
  🔵 Tanh / Hyperbolic Tangent Activation Function The tanh (hyperbolic tangent) function is another important nonlinear activation function used in artificial neural networks. It is closely related to the sigmoid function, but it has one important advantage: its output is centered around zero . The tanh function is particularly useful for understanding the evolution from sigmoid-based neural networks to modern activation functions such as ReLU. 🧠 1. What Is the Tanh Function? The hyperbolic tangent function is defined as: tanh ⁡ ( z ) = e z − e − z e z + e − z \boxed{ \tanh(z)=\frac{e^z-e^{-z}}{e^z+e^{-z}} } It can also be expressed in terms of the sigmoid function: tanh ⁡ ( z ) = 2 σ ( 2 z ) − 1 \boxed{ \tanh(z)=2\sigma(2z)-1 } where: σ ( z ) = 1 1 + e − z \boxed{ \sigma(z)=\frac{1}{1+e^{-z}} } The output of tanh lies between: − 1 < tanh ( z ) < 1 ​ So, conceptually: Tanh = scaled sigmoid − shift ​ 📈 2. Shape of the Tanh Function The tanh function has an ...

Applications of Neural Networks

  🧠 Applications of Neural Networks Neural networks are widely used because they can learn complex relationships from data and perform tasks such as classification, prediction, recognition, and generation. 👁️ 1. Image and Face Recognition 📷 Computer Vision Neural networks, especially CNNs , can learn features such as edges, shapes, textures, and objects from images. 📷 Image ↓ 🧠 CNN ↓ 🔍 Feature Extraction ↓ 👤 Face / Object ↓ ✅ Recognition Applications: Face recognition Object detection Medical image analysis Automatic number plate recognition Quality inspection in industries 🗣️ 2. Speech Recognition 🎙️ Speech → Text Neural networks can convert spoken language into text by learning patterns in audio signals. 🎙️ Speech ↓ 🔊 Audio Signal ↓ 🧠 Neural Network ↓ 📝 Text Applications: Voice assistants Speech-to-text systems Automatic transcription Voice-controlled applications 💬 3. Natural Language Processing 🌐 Understanding Human Language Neural networ...