Introduction to Deep Learning with PyTorch
Jasmin Ludolf
Senior Data Science Content Developer, DataCamp
$$
$$
Sigmoid function:
Gradients:
$$
The softmax function also suffers from saturation
Rectified Linear Unit (ReLU):
f(x) = max(x, 0)
$$
In PyTorch:
relu = nn.ReLU()
Leaky ReLU:
$$
In PyTorch:
leaky_relu = nn.LeakyReLU(
negative_slope = 0.05)
Introduction to Deep Learning with PyTorch