Recall & Review
beginner
What is a SimpleRNN layer in TensorFlow?
A SimpleRNN layer is a type of recurrent neural network layer that processes sequences by passing information from one step to the next, helping the model remember past information.
Click to reveal answer
beginner
How does a SimpleRNN layer handle sequence data?
It processes input data step-by-step in order, updating its internal state at each step to remember information from previous inputs.
Click to reveal answer
intermediate
What is the main difference between SimpleRNN and LSTM layers?
SimpleRNN has a simpler structure and can forget information quickly, while LSTM has gates that help it remember information longer and handle complex patterns better.
Click to reveal answer
beginner
Write a simple TensorFlow code snippet to create a SimpleRNN layer with 10 units.
import tensorflow as tf
rnn_layer = tf.keras.layers.SimpleRNN(10)
# This creates a SimpleRNN layer with 10 memory units.Click to reveal answer
intermediate
What does the 'return_sequences' parameter do in a SimpleRNN layer?
If 'return_sequences=True', the layer returns the output for every time step in the input sequence. If False, it returns only the output from the last time step.
Click to reveal answer
What type of data is a SimpleRNN layer designed to process?
✗ Incorrect
SimpleRNN layers are designed to process sequence data, like time series or sentences, where order matters.
Which TensorFlow module contains the SimpleRNN layer?
✗ Incorrect
The SimpleRNN layer is part of the tf.keras.layers module.
What does setting 'return_sequences=True' do in a SimpleRNN layer?
✗ Incorrect
Setting 'return_sequences=True' makes the layer output the hidden state for every time step.
Which of these is a limitation of SimpleRNN compared to LSTM?
✗ Incorrect
SimpleRNN tends to forget information quickly, making it less effective for long sequences.
How do you create a SimpleRNN layer with 20 units in TensorFlow?
✗ Incorrect
The correct syntax is tf.keras.layers.SimpleRNN(20).
Explain how a SimpleRNN layer processes sequence data step-by-step.
Think about how the layer moves through the sequence and keeps track of what it saw before.
You got /4 concepts.
Describe the difference between setting 'return_sequences' to True or False in a SimpleRNN layer.
Consider what output you want when stacking layers or making predictions.
You got /4 concepts.