Activation Functions

2025-07-13 · 约 3 分钟 · 标签: Activation Functions , Neural Networks , Deep Learning

Linear Activation Function

Exhibit a linear relationship between input and output, often used in regression tasks. The output is simply the weighted sum of inputs plus bias.

  • General Formula
f(x)=wx+bf(x) = wx + b

m: Slope, reprents the rate of change of the output with respect to the input.
b: Intercept, the output when the input is zero.

Non-Linear Activation Functions

Non-linear activation functions introduce non-linearity into the model, allowing it to learn complex patterns. and Don’t follow a straight-line pattern.

  • Common examples:
  • Polynomial functions
  • Exponential functions
  • Logarithmic functions
  • Trigonometric functions

Activation Functions

  • Sigmoid: Maps input values to a range between 0 and 1, useful for binary classification.
  • ReLU (Rectified Linear Unit): Outputs the input directly if positive; otherwise, it outputs zero. It helps mitigate the vanishing gradient problem.
  • Tanh: Maps input values to a range between -1 and 1, useful for zero-centered data.
  • Softmax: Converts a vector of values into probabilities, often used in multi-class classification tasks.
评论
评论功能尚未配置:在 GitHub 仓库开启 Discussions,并按项目 README 里的步骤填好 src/consts.ts 即可启用(基于 Giscus,评论需要 GitHub 账号)。