0
0
TensorFlowml~5 mins

Activation functions (ReLU, sigmoid, softmax) in TensorFlow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the ReLU activation function do to input values?
ReLU (Rectified Linear Unit) outputs the input directly if it is positive; otherwise, it outputs zero. It helps models learn faster by allowing only positive signals to pass.
Click to reveal answer
beginner
Describe the sigmoid activation function and its output range.
The sigmoid function squashes input values into a range between 0 and 1, making it useful for probabilities in binary classification tasks.
Click to reveal answer
intermediate
What is the purpose of the softmax activation function in neural networks?
Softmax converts a vector of raw scores into probabilities that sum to 1, often used in the output layer for multi-class classification.
Click to reveal answer
intermediate
Why is ReLU preferred over sigmoid in hidden layers of deep networks?
ReLU avoids the vanishing gradient problem by not saturating for positive inputs, allowing faster and more effective training compared to sigmoid.
Click to reveal answer
intermediate
How does softmax ensure the outputs can be interpreted as probabilities?
Softmax exponentiates each input and divides by the sum of all exponentiated inputs, ensuring all outputs are positive and sum to 1.
Click to reveal answer
Which activation function outputs zero for all negative inputs?
ASoftmax
BReLU
CSigmoid
DTanh
What is the output range of the sigmoid activation function?
A-infinity to infinity
B-1 to 1
C0 to infinity
D0 to 1
Which activation function is best suited for multi-class classification output layers?
ASoftmax
BReLU
CSigmoid
DLinear
Why might sigmoid activation slow down training in deep networks?
AIt causes vanishing gradients
BIt is not differentiable
CIt outputs negative values only
DIt outputs only zeros
How does softmax transform its input vector?
ABy applying ReLU element-wise
BBy normalizing inputs to sum to zero
CBy exponentiating inputs and normalizing to sum to one
DBy clipping inputs between 0 and 1
Explain the differences between ReLU, sigmoid, and softmax activation functions and when to use each.
Think about output ranges and typical use cases in neural networks.
You got /6 concepts.
    Describe why ReLU helps avoid the vanishing gradient problem compared to sigmoid.
    Consider how gradients behave during backpropagation.
    You got /4 concepts.