PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

AI · Theory

Activation Functions in Neural Networks

← All stacks

Theory

118/215

Activation Functions in Neural Networks

Activation adds non-linearity. Without it, stacked layers collapse to one linear map. ReLU = max(0, x) is the workhorse. Sigmoid/tanh squash; they saturate (vanishing gradients). Softmax on the last layer for multi-class probabilities.

Viva — why activation + name ReLU + one old one (sigmoid).

Activation Functions in Neural Networks — output: -2 → 0 / 0 → 0 / 3 → 3. Without activation, deep layers collapse to linear.

Exam tip

Why no activation = pointless deep net.

Example

# ReLU
def relu(x):
    return x if x > 0 else 0
for v in [-2, 0, 3]:
    print(v, "→", relu(v))

Activation Functions in Neural Networks — output: -2 → 0 / 0 → 0 / 3 → 3. Without activation, deep layers collapse to linear.

Short notes

  • DefNon-linearity. ReLU common.
  • RuleSoftmax for classes.

Questions

1

Explain Activation Functions in Neural Networks as if you are teaching a junior — definition, then one example.

2

What does the example print, and what does that prove?

3

What mistake do freshers make with Activation Functions in Neural Networks?

Previous← Procedural Vs. Declarative KnowledgeNextTop 10 Artificial Intelligence Mini Projects →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.