📘 Lesson  ·  Lesson 90

Activation Functions

Activation Function क्या है?

💡 एक नज़र में

Activation function तय करती है कि neuron "fire" करे या नहीं। यह non-linearity जोड़ती है ताकि neural networks जटिल patterns सीख सकें।

Common Functions

FunctionOutput RangeUse
Sigmoid0 से 1binary output / probabilities
Tanh-1 से 1hidden layers (zero-centered)
ReLU0 से अनंतdeep networks में सबसे common

Code में

Python
import numpy as np
def relu(x): return np.maximum(0, x)
def sigmoid(x): return 1 / (1 + np.exp(-x))

print(relu(-3), relu(5))      # 0 5
print(round(sigmoid(0), 2))   # 0.5
0 5 0.5

सारांश

  • Activation functions neural networks में non-linearity जोड़ती हैं।
  • ReLU सबसे common; Sigmoid probabilities के लिए; Tanh zero-centered।
← Back to Python Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

💻 लाइव कोड एडिटर

इस पेज के प्रोग्राम यहीं तैयार हैं — चलाएँ, बदलें और सीखें। कुछ भी इंस्टॉल किए बिना।
OneCompiler द्वारा संचालित। कोड एडिटर में अपने आप आ जाता है — Run दबाकर आउटपुट देखें। अगर एडिटर न खुले तो नए टैब में खोलें.