Recall & Review
beginner
What is a Dense (fully connected) layer in a neural network?
A Dense layer connects every input neuron to every output neuron with its own weight. It helps the model learn complex patterns by combining all inputs.
Click to reveal answer
beginner
How does a Dense layer transform its input?
It multiplies the input by a weight matrix, adds a bias vector, then applies an activation function to produce the output.
Click to reveal answer
beginner
Why do we use activation functions after Dense layers?
Activation functions add non-linearity, allowing the network to learn complex patterns beyond simple straight lines.
Click to reveal answer
beginner
In TensorFlow, how do you add a Dense layer with 10 neurons and ReLU activation?
Use: tf.keras.layers.Dense(10, activation='relu') inside your model.
Click to reveal answer
intermediate
What happens if you omit the activation function in a Dense layer?
The layer will perform only a linear transformation, limiting the model's ability to learn complex patterns.
Click to reveal answer
What does a Dense layer do in a neural network?
✗ Incorrect
A Dense layer fully connects every input neuron to every output neuron with weights.
Which operation is NOT part of a Dense layer's computation?
✗ Incorrect
Pooling is a separate operation, not part of Dense layer computation.
Why do we add activation functions after Dense layers?
✗ Incorrect
Activation functions add non-linearity, enabling complex pattern learning.
In TensorFlow, how do you create a Dense layer with 5 neurons and no activation?
✗ Incorrect
By default, Dense layers have no activation if not specified, so tf.keras.layers.Dense(5) creates 5 neurons with linear activation.
What is the role of the bias term in a Dense layer?
✗ Incorrect
Bias shifts the output, allowing the model to fit data more flexibly.
Explain in your own words what a Dense (fully connected) layer does in a neural network and why it is important.
Think about how every input influences every output and how the layer helps the model learn.
You got /4 concepts.
Describe how you would add a Dense layer in TensorFlow and what parameters you might specify.
Consider the basic syntax and common options like activation.
You got /4 concepts.