1Which feature distinguishes sequential data from ordinary independent data?
Modeling sequential data
Easy
A.Every observation has one feature
B.The order of observations matters
C.The dataset has no labels
D.All observations are identical
Correct Answer: The order of observations matters
Explanation:
In sequential data, the meaning of an observation often depends on earlier or later observations.
Incorrect! Try again.
2Which of the following is an example of sequential data?
Modeling sequential data
Easy
A.A collection of unrelated photographs
B.A set of shuffled color values
C.A table of independent customer IDs
D.A sentence containing ordered words
Correct Answer: A sentence containing ordered words
Explanation:
A sentence is sequential because word order helps determine its meaning.
Incorrect! Try again.
3What information does the hidden state of an RNN mainly represent?
Understanding the structure and flow of an RNN
Easy
A.A summary of previous inputs
B.A copy of the final label
C.A list of model errors
D.A fixed learning rate
Correct Answer: A summary of previous inputs
Explanation:
The hidden state carries information from earlier time steps through the sequence.
Incorrect! Try again.
4What is typically passed from one time step to the next in a basic RNN?
Understanding the structure and flow of an RNN
Easy
A.The hidden state
B.The loss function
C.The test dataset
D.The batch size
Correct Answer: The hidden state
Explanation:
The hidden state provides the RNN with memory of previously processed inputs.
Incorrect! Try again.
5Which two values are normally used to compute the current hidden activation in a basic RNN?
Computing activation in an RNN
Easy
A.Current label and future hidden state
B.Current input and previous hidden state
C.Batch size and learning rate
D.Previous output and test accuracy
Correct Answer: Current input and previous hidden state
Explanation:
At time , an RNN combines the current input with the previous hidden state .
Incorrect! Try again.
6Which activation function is traditionally used for the hidden state of a simple RNN?
Computing activation in an RNN
Easy
A.Tanh
B.One-hot encoding
C.Argmax
D.Softmax
Correct Answer: Tanh
Explanation:
The hyperbolic tangent function is commonly used to compute hidden activations in a basic RNN.
Incorrect! Try again.
7Which problem can make a basic RNN forget information from much earlier time steps?
Challenges of learning long-range interactions
Easy
A.One-hot encoding
B.Vanishing gradients
C.Data shuffling
D.Label smoothing
Correct Answer: Vanishing gradients
Explanation:
Vanishing gradients make it difficult for learning signals to travel across many time steps.
Incorrect! Try again.
8What is meant by a long-range dependency in a sequence?
Challenges of learning long-range interactions
Easy
A.A difference between training batches
B.A connection between two model layers
C.A connection between widely separated time steps
D.A comparison between two datasets
Correct Answer: A connection between widely separated time steps
Explanation:
A long-range dependency occurs when an earlier element influences another element much later in the sequence.
Incorrect! Try again.
9Which TensorFlow API is commonly used to build neural network layers?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Easy
A.TensorBoard Profiler
B.TensorFlow Serving
C.TensorFlow Keras
D.TensorFlow Lite
Correct Answer: TensorFlow Keras
Explanation:
The Keras API provides layers and models for implementing RNNs in TensorFlow.
Incorrect! Try again.
10What makes an RNN a multilayer RNN?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Easy
A.Multiple recurrent layers are stacked
B.Multiple datasets are combined
C.Multiple optimizers are alternated
D.Multiple labels are removed
Correct Answer: Multiple recurrent layers are stacked
Explanation:
A multilayer RNN places recurrent layers on top of one another to learn richer sequence representations.
Incorrect! Try again.
11What is the usual output of a text classification RNN?
Text classification with an RNN
Easy
A.A sequence length
B.A class label
C.A vocabulary list
D.A generated paragraph
Correct Answer: A class label
Explanation:
Text classification assigns a category, such as positive or negative, to an input text.
Incorrect! Try again.
12What is the main purpose of an embedding layer in an RNN text classifier?
Text classification with an RNN
Easy
A.Sort sentences by length
B.Convert tokens into dense vectors
C.Remove every repeated word
D.Calculate the final accuracy
Correct Answer: Convert tokens into dense vectors
Explanation:
An embedding layer maps discrete tokens to dense numerical vectors that the RNN can process.
Incorrect! Try again.
13During basic RNN text generation, what is commonly fed back into the model to continue the sequence?
Text generation with an RNN
Easy
A.The previously generated token
B.The optimizer's name
C.The complete training dataset
D.The model's batch size
Correct Answer: The previously generated token
Explanation:
The generated token can be used as the next input so that the model produces text one step at a time.
Incorrect! Try again.
14What does the softmax output represent in a character-level text generation model?
Text generation with an RNN
Easy
A.Probabilities of possible next characters
B.Lengths of all training sentences
C.Counts of completed training epochs
D.Weights of the recurrent connections
Correct Answer: Probabilities of possible next characters
Explanation:
Softmax produces a probability distribution over the characters that could appear next.
Incorrect! Try again.
15What is the goal of time series forecasting?
Time series forecasting
Easy
A.Group images by visual similarity
B.Translate labels into feature vectors
C.Predict future values from past observations
D.Remove the order from observations
Correct Answer: Predict future values from past observations
Explanation:
Time series forecasting uses historical patterns to estimate one or more future values.
Incorrect! Try again.
16Which dataset is most suitable for time series forecasting?
Time series forecasting
Easy
A.Randomly generated identification codes
B.Independent images of household objects
C.Unordered names in a contact list
D.Daily temperatures recorded over a year
Correct Answer: Daily temperatures recorded over a year
Explanation:
Daily temperatures are ordered by time and may contain patterns useful for predicting future temperatures.
Incorrect! Try again.
17What does LSTM stand for?
LSTM units
Easy
A.Local Signal Testing Machine
B.Linear Sequence Training Model
C.Long Short-Term Memory
D.Layered State Transfer Method
Correct Answer: Long Short-Term Memory
Explanation:
LSTM means Long Short-Term Memory, a recurrent architecture designed to retain useful information over time.
Incorrect! Try again.
18Which component of an LSTM controls what information is removed from the cell state?
LSTM units
Easy
A.Forget gate
B.Embedding table
C.Output layer
D.Softmax class
Correct Answer: Forget gate
Explanation:
The forget gate determines which information in the previous cell state should be discarded.
Incorrect! Try again.
19Why is an LSTM suitable for sequence classification?
Sequence classification with LSTM
Easy
A.It always removes the sequence order
B.It requires no numerical input values
C.It guarantees perfect class predictions
D.It can retain information across time steps
Correct Answer: It can retain information across time steps
Explanation:
An LSTM can preserve relevant context from earlier parts of a sequence when predicting its class.
Incorrect! Try again.
20What is a stacked LSTM model?
Stacked LSTM for sequence classification
Easy
A.A model with multiple LSTM layers
B.A model with multiple test datasets
C.A model with multiple input labels
D.A model with multiple loss values
Correct Answer: A model with multiple LSTM layers
Explanation:
A stacked LSTM places two or more LSTM layers in sequence to learn increasingly complex representations.
Incorrect! Try again.
21A model predicts the next value in a sensor stream using the previous 20 readings. Why should the readings within each input window not be randomly shuffled?
Modeling sequential data
Medium
A.Shuffling forces every sensor reading to have the same value
B.Shuffling always increases the number of training parameters
C.Shuffling prevents the use of nonlinear activation functions
D.Shuffling changes the temporal relationships the model must learn
Correct Answer: Shuffling changes the temporal relationships the model must learn
Explanation:
The order of observations carries information in sequential data. Shuffling values within a window destroys dependencies such as trends, delays, and temporal patterns.
Incorrect! Try again.
22An RNN processes an input sequence with 12 time steps and produces one hidden state at each step. If the hidden size is 32, what is the output shape for a batch of 64 sequences when all hidden states are returned?
Understanding the structure and flow of an RNN
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Returning all hidden states produces one 32-dimensional vector for each of the 12 time steps in every sequence, giving .
Incorrect! Try again.
23For a scalar RNN, let . If , , , , and , what is approximately?
Computing activation in an RNN
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The pre-activation is . Therefore, .
Incorrect! Try again.
24During backpropagation through time, why are gradient contributions from different time steps added when updating the recurrent weight matrix?
Understanding the structure and flow of an RNN
Medium
A.Each time step creates an independent recurrent weight matrix
B.The same recurrent weights are reused at every time step
C.The recurrent weights are updated only from the final input because earlier hidden states are treated as constants throughout training
D.Gradient addition converts the sequence into unordered tabular data
Correct Answer: The same recurrent weights are reused at every time step
Explanation:
An RNN shares its recurrent parameters across time. Their total gradient therefore includes contributions from every unrolled use of those parameters.
Incorrect! Try again.
25An RNN repeatedly multiplies gradients by recurrent derivatives whose magnitudes are mostly below 1. What problem is most likely for long sequences?
Challenges of learning long-range interactions
Medium
A.Gradients for early time steps become extremely large
B.Hidden states become independent trainable parameters
C.Sequence lengths automatically decrease during training
D.Gradients for early time steps become very small
Correct Answer: Gradients for early time steps become very small
Explanation:
Repeated multiplication by values below 1 causes gradients to shrink, producing the vanishing-gradient problem and weakening learning from distant time steps.
Incorrect! Try again.
26Training an RNN becomes unstable because the gradient norm occasionally grows from 8 to several thousand. Which technique most directly addresses this behavior?
Challenges of learning long-range interactions
Medium
A.Replace every hidden state with the original input at each time step
B.Sort sequences by their target labels
C.Remove all recurrent connections
D.Clip gradients to a maximum norm
Correct Answer: Clip gradients to a maximum norm
Explanation:
Gradient clipping limits excessively large updates and is commonly used to control exploding gradients in recurrent networks.
Incorrect! Try again.
27In TensorFlow/Keras, two recurrent layers are stacked. What setting is normally required on the first recurrent layer so that the second layer receives a sequence?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Medium
A.Set unroll=False
B.Set stateful=False
C.Set return_state=True
D.Set return_sequences=True
Correct Answer: Set return_sequences=True
Explanation:
An intermediate recurrent layer must return an output at every time step. Otherwise, the next recurrent layer receives only one vector rather than a sequence.
Incorrect! Try again.
28A batch contains variable-length sequences padded with zeros. What is the main purpose of adding a Keras Masking layer before the RNN?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Medium
A.To make all sequences contain the same meaningful observations
B.To guarantee that all hidden-state gradients have magnitude exactly one throughout training
C.To prevent padded time steps from affecting sequence processing
D.To convert every zero value into a randomly initialized embedding
Correct Answer: To prevent padded time steps from affecting sequence processing
Explanation:
Masking identifies padded positions so compatible recurrent layers can ignore those positions when computing sequence representations.
Incorrect! Try again.
29A sentiment classifier receives a review and predicts one label for the entire review. Which RNN input-output pattern best describes this task?
Text classification with an RNN
Medium
A.One-to-many
B.Many-to-many with aligned labels
C.Many-to-one
D.One-to-one
Correct Answer: Many-to-one
Explanation:
The model consumes many token representations and produces one sequence-level class prediction, so the task follows a many-to-one pattern.
Incorrect! Try again.
30A review may contain important sentiment words near both its beginning and end. Which architecture can directly use left and right context when encoding each token?
Text classification with an RNN
Medium
A.A linear regression model
B.An RNN that discards all token order and averages only the integer token identifiers
C.A unidirectional RNN
D.A bidirectional RNN
Correct Answer: A bidirectional RNN
Explanation:
A bidirectional RNN processes the review in both directions, allowing each token representation to incorporate preceding and following context.
Incorrect! Try again.
31During autoregressive text generation, what is typically supplied as the next input after the model predicts a probability distribution over tokens?
Text generation with an RNN
Medium
A.The complete training corpus
B.The true next token from the test sequence regardless of what the model predicted
C.The token selected from that distribution
D.The hidden state from the first time step
Correct Answer: The token selected from that distribution
Explanation:
Autoregressive generation repeatedly selects a token from the current distribution and feeds that token back to predict the following one.
Incorrect! Try again.
32A text generator produces overly predictable output. What is the likely effect of moderately increasing the sampling temperature from to ?
Text generation with an RNN
Medium
A.The vocabulary is permanently reduced to the most frequent token
B.The token distribution becomes more peaked and output becomes more deterministic
C.The token distribution becomes less peaked and output becomes more varied
D.The model retrains its recurrent weights during every generation step to ensure that rare tokens always receive the highest probability
Correct Answer: The token distribution becomes less peaked and output becomes more varied
Explanation:
A higher temperature generally flattens the sampling distribution, increasing the chance of selecting less probable tokens and producing more diverse text.
Incorrect! Try again.
33A time series has hourly values. Each training sample uses the previous 24 values to predict the next value. If the series contains 1,000 values and windows move by one step, how many samples can be formed?
Time series forecasting
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The first target follows the initial 24-value window. Thus, the number of samples is .
Incorrect! Try again.
34A one-step RNN forecaster is used recursively to predict the next 10 days. Why may forecast errors increase for later days?
Time series forecasting
Medium
A.Earlier predictions are reused as inputs, so their errors can accumulate
B.Every future prediction uses an independently trained RNN with parameters selected after observing the actual future values
C.Recursive forecasting removes all uncertainty after the first prediction
D.The model receives more true observations at every future step
Correct Answer: Earlier predictions are reused as inputs, so their errors can accumulate
Explanation:
In recursive forecasting, predicted values become inputs for later predictions. Any error can therefore propagate and compound over the forecast horizon.
Incorrect! Try again.
35For an LSTM cell, the forget gate is close to and the input gate is close to at a particular time step. What is the most likely effect on the cell state?
LSTM units
Medium
A.Both old memory and new candidate information are fully blocked
B.Old memory is preserved and new candidate information is blocked
C.Old memory is mostly removed and new candidate information is added
D.The output gate directly replaces the cell state with the current input
Correct Answer: Old memory is mostly removed and new candidate information is added
Explanation:
The forget gate scales the previous cell state, while the input gate scales new candidate information. Values near and , respectively, favor replacement with new information.
Incorrect! Try again.
36Why can an LSTM often preserve information over longer intervals than a basic tanh RNN?
LSTM units
Medium
A.It assigns a separate loss function to every training example
B.Its gated cell-state path supports controlled information flow
C.It removes the need to share parameters across time steps
D.Its hidden state is always copied unchanged through the complete sequence without being influenced by inputs
Correct Answer: Its gated cell-state path supports controlled information flow
Explanation:
The cell state and gates allow an LSTM to retain, update, or discard information selectively, reducing the difficulty of learning long-range dependencies.
Incorrect! Try again.
37An LSTM classifies fixed-length activity sequences into five classes using only its final output. Which output layer is most appropriate?
Sequence classification with LSTM
Medium
A.A dense layer with 1 unit and ReLU activation
B.A recurrent layer that returns one unrelated class label at every input feature
C.A dense layer with 5 units and no classification loss
D.A dense layer with 5 units and softmax activation
Correct Answer: A dense layer with 5 units and softmax activation
Explanation:
A five-class single-label problem requires five output scores. Softmax converts them into a probability distribution across the classes.
Incorrect! Try again.
38Variable-length sequences are padded before being passed to an LSTM classifier. If padding is not masked, what failure may occur?
Sequence classification with LSTM
Medium
A.The output probabilities always become uniform regardless of the learned weights, input values, or sequence lengths
B.The LSTM automatically shortens every sequence to one time step
C.The classifier becomes mathematically equivalent to a convolutional network
D.The LSTM may treat padding values as meaningful sequence content
Correct Answer: The LSTM may treat padding values as meaningful sequence content
Explanation:
Without masking, padded positions are processed like ordinary observations and may distort the hidden representation used for classification.
Incorrect! Try again.
39Consider LSTM(64, return_sequences=True) followed by LSTM(32) for classification. If the input shape is , what shape does the second LSTM receive?
Stacked LSTM for sequence classification
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The first LSTM returns 64 features at each of the 40 time steps for every sequence in the batch, producing .
Incorrect! Try again.
40A stacked LSTM achieves very high training accuracy but poor validation accuracy on a small sequence-classification dataset. Which change is most appropriate?
Stacked LSTM for sequence classification
Medium
A.Add dropout or reduce the model size
B.Train until both training and validation losses become exactly zero
C.Remove validation data and select the model using only its performance on the training sequences
D.Increase the number of LSTM layers substantially
Correct Answer: Add dropout or reduce the model size
Explanation:
The gap between training and validation performance indicates overfitting. Dropout or a smaller architecture can improve generalization.
Incorrect! Try again.
41A medical event sequence contains observations at irregular timestamps. Two patients may have the same ordered measurements but very different time gaps. Which representation best enables an RNN to distinguish these cases without resampling?
Modeling sequential data
Hard
A.Use zero padding to make all patient sequences have identical lengths and treat every padded position as an ordinary event
B.Sort each patient's measurements by magnitude before applying the RNN
C.Append the elapsed time since the previous event to each input vector
D.Duplicate every observation according to its absolute timestamp
Correct Answer: Append the elapsed time since the previous event to each input vector
Explanation:
A standard RNN models order but does not inherently know elapsed time. Including time gaps allows its state transition to depend on irregular temporal spacing.
Incorrect! Try again.
42For the recurrence , which statement correctly describes parameter sharing after the network is unrolled for steps?
Understanding the structure and flow of an RNN
Hard
A.Each time step receives a distinct copy of all trainable parameters
B.Every time step uses the same , , and
C.Only is shared, while and vary with time
D.The parameters are shared during inference but independently optimized at each time step during training
Correct Answer: Every time step uses the same , , and
Explanation:
Unrolling creates repeated applications of one recurrent cell. The parameters are shared across all time steps, which allows variable-length processing.
Incorrect! Try again.
43Consider , where
, , , and . What is approximately?
Computing activation in an RNN
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The pre-activation is . Applying elementwise gives approximately .
Incorrect! Try again.
44Ignoring loss contributions at intermediate times, which expression most directly governs how a gradient from time reaches the hidden state at time in a vanilla RNN?
Challenges of learning long-range interactions
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Backpropagation through time multiplies the recurrent Jacobians. Repeated multiplication can make gradients vanish or explode depending on their singular values.
Incorrect! Try again.
45A TensorFlow model receives input with shape (B, T, D) and contains LSTM(64, return_sequences=True) followed by LSTM(32, return_sequences=False). What are the outputs of the first and second LSTM layers?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Hard
A.First: (B, T, 64); second: (B, 32)
B.First: (B, T, 64); second: (B, T, 32)
C.First: (B, 64); second: (B, 32)
D.First: (T, B, 64); second: (T, B, 32) because recurrent layers always preserve the temporal dimension
return_sequences=True returns one output per time step. The second layer returns only its final output because return_sequences=False.
Incorrect! Try again.
46A batch of token sequences is right-padded with token ID 0. A classifier uses the final output of an LSTM, but the embedding does not generate a mask. What is the most likely consequence?
Text classification with an RNN
Hard
A.Padding tokens can alter the final hidden state and therefore the prediction
B.Padding changes only the embedding gradients, not the recurrent state
C.The final hidden state always corresponds to the last nonzero token because TensorFlow removes padded positions before recurrence
D.The LSTM automatically infers sequence lengths from repeated zeros
Correct Answer: Padding tokens can alter the final hidden state and therefore the prediction
Explanation:
Without masking, padded positions are processed as genuine inputs. Using Embedding(mask_zero=True) or an explicit mask prevents them from updating the sequence representation.
Incorrect! Try again.
47During text generation, the next-token distribution is computed as . Assuming , which statement is correct?
Text generation with an RNN
Hard
A.Increasing sharpens the distribution and approaches greedy decoding
B.Decreasing flattens the distribution and increases its entropy
C.Decreasing sharpens the distribution without changing the largest-logit token
D.Changing modifies the ordering of logits, so a different token necessarily becomes the most probable one
Correct Answer: Decreasing sharpens the distribution without changing the largest-logit token
Explanation:
Dividing by a smaller positive temperature magnifies logit differences. It lowers entropy, while preserving the ordering of logits.
Incorrect! Try again.
48A model must forecast the next 12 values. Which claim correctly distinguishes direct multi-horizon forecasting from recursive one-step forecasting?
Time series forecasting
Hard
A.Recursive forecasting cannot accumulate error because the same one-step model is reused at every future horizon
B.Recursive forecasting predicts all 12 horizons in one pass using separate output neurons
C.Direct forecasting trains 12 independent models and cannot share representations across horizons
D.Direct forecasting emits all 12 predictions together and avoids feeding earlier predictions back as inputs
Correct Answer: Direct forecasting emits all 12 predictions together and avoids feeding earlier predictions back as inputs
Explanation:
A direct model can output the full horizon simultaneously. Recursive forecasting repeatedly consumes its own predictions, so errors can accumulate.
Incorrect! Try again.
49For an LSTM cell state , what is the local derivative when indirect dependencies of the gates on earlier states are held fixed?
LSTM units
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The forget gate directly scales the previous cell state. Values of near one create a path through which information and gradients can persist.
Incorrect! Try again.
50An offline document classifier assigns one label after reading the entire document. When is a bidirectional LSTM preferable to a unidirectional LSTM?
Sequence classification with LSTM
Hard
A.When the model must preserve strict causality during real-time deployment
B.When predictions must be emitted before future tokens become available
C.When future tokens are unavailable during inference but are available during training, allowing the backward LSTM to be discarded after optimization
D.When each token representation may use both preceding and following context
Correct Answer: When each token representation may use both preceding and following context
Explanation:
Offline classification can exploit the complete sequence, so bidirectional processing supplies past and future context. It is unsuitable when strict online causality is required.
Incorrect! Try again.
51A stacked LSTM classifier contains three LSTM layers followed by a dense classification layer. Which return_sequences configuration is generally required when only one label is produced per sequence?
Stacked LSTM for sequence classification
Hard
A.All three layers must use True, and the dense layer automatically selects the final valid time step without pooling or slicing
B.All three layers must use False to produce one sequence label
C.The first two layers use True, and the third may use False
D.Only the first layer uses False, while the remaining layers use True
Correct Answer: The first two layers use True, and the third may use False
Explanation:
Each nonfinal recurrent layer must expose its full output sequence to the next recurrent layer. The final LSTM may return only its final output for sequence-level classification.
Incorrect! Try again.
52An LSTM layer has input dimension and hidden dimension . Using one input kernel, one recurrent kernel, and one bias vector for each of four gates, how many trainable parameters does it have?
LSTM units
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Each of four gate computations has input weights, recurrent weights, and biases, giving .
Incorrect! Try again.
53In truncated backpropagation through time, hidden states are carried from one segment to the next but detached from the previous computation graph. What is the key implication?
Challenges of learning long-range interactions
Hard
A.Forward information can cross segments, but gradients cannot cross the detach boundary
B.Neither activations nor gradients can carry information across segment boundaries
C.The procedure is mathematically identical to full backpropagation through time as long as the hidden-state values are preserved
D.Gradients cross every boundary, but hidden states are reinitialized at each segment
Correct Answer: Forward information can cross segments, but gradients cannot cross the detach boundary
Explanation:
Detachment preserves the numerical hidden state for forward processing while limiting the gradient horizon, reducing memory and computational cost.
Incorrect! Try again.
54A character-level RNN is trained using the true previous character at every time step, but during generation it receives its own sampled output. Which problem does this discrepancy create?
Text generation with an RNN
Hard
A.Gradient explosion, because sampled tokens always have larger embedding norms
B.Class imbalance, because teacher forcing makes every character occur with equal probability during optimization
C.Exposure bias, because inference may visit prefixes not encountered under teacher forcing
D.Label leakage, because future characters are directly included in the hidden state
Correct Answer: Exposure bias, because inference may visit prefixes not encountered under teacher forcing
Explanation:
Teacher forcing conditions training on correct prefixes. At inference, an early error changes later inputs and can compound because such prefixes were rarely seen during training.
Incorrect! Try again.
55A standardization transform is applied before walk-forward validation. Which procedure avoids future-data leakage?
Time series forecasting
Hard
A.Fit the scaler on each validation window and apply it backward to training data
B.Fit the scaler only on the training portion of each validation fold
C.Fit the scaler once on the complete series before constructing folds
D.Fit separate scalers to every input window using all input and target values so that each example has zero mean
Correct Answer: Fit the scaler only on the training portion of each validation fold
Explanation:
Preprocessing parameters must be estimated without using validation or future observations. Otherwise, information from the evaluation period influences model inputs.
Incorrect! Try again.
56For a causal many-to-many RNN that predicts a label at every time , which dependency is valid?
Understanding the structure and flow of an RNN
Hard
A. may depend on future inputs during training because the recurrent connection removes that dependency during inference
B. must depend on the complete sequence
C. may depend on but not on
D. may depend only on because recurrent states are not outputs
Correct Answer: may depend on but not on
Explanation:
A causal unidirectional RNN summarizes the current and preceding inputs in . Future inputs have not yet entered the recurrent state.
Incorrect! Try again.
57Let and . If one component of has magnitude much greater than , what happens to gradient flow through that component?
Computing activation in an RNN
Hard
A.The derivative grows proportionally to and amplifies gradients
B.The derivative approaches one because becomes nearly linear
C.The derivative changes sign whenever the pre-activation is negative, causing alternating exploding and vanishing gradients
D.The derivative approaches zero because approaches zero
Correct Answer: The derivative approaches zero because approaches zero
Explanation:
Large-magnitude pre-activations saturate near or . Its derivative then becomes small, contributing to vanishing gradients.
Incorrect! Try again.
58A TensorFlow model uses a stateful RNN to process a long time series split into consecutive batches. What training setup is necessary for the carried states to remain associated with the correct streams?
Implementing a multilayer RNN for sequence modeling in TensorFlow
Hard
A.Disable batch shuffling and reset states at true sequence boundaries
B.Use a different batch size at every step so hidden states follow temporal order
C.Reset states after every batch while also setting stateful=True, because statefulness affects only gradient sharing and not activation values
D.Shuffle batches after every epoch and preserve states across unrelated sequences
Correct Answer: Disable batch shuffling and reset states at true sequence boundaries
Explanation:
Stateful RNNs associate each batch index with a persistent state. Shuffling or mixing unrelated streams would transfer hidden states to the wrong samples.
Incorrect! Try again.
59A two-layer stacked LSTM uses hidden size in both layers and input size in the first layer. Ignoring the classifier, how many trainable recurrent-layer parameters are present?
Stacked LSTM for sequence classification
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The first layer has parameters. The second receives an -dimensional input and has , producing in total.
Incorrect! Try again.
60Training a vanilla RNN shows exploding gradients, so global-norm gradient clipping is introduced. Which limitation remains?
Challenges of learning long-range interactions
Hard
A.Clipping removes the need for gated units because it preserves all long-term dependencies
B.Clipping modifies the forward hidden states so saturated activations become linear throughout the entire sequence
C.Clipping controls excessive gradient magnitude but does not restore vanished long-range gradients
D.Clipping guarantees that every recurrent Jacobian has singular values exactly equal to one
Correct Answer: Clipping controls excessive gradient magnitude but does not restore vanished long-range gradients
Explanation:
Gradient clipping limits unstable updates caused by large gradients. It cannot recover information already lost through repeated small Jacobian products or saturated activations.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →