chapter 16 Flashcards

(21 cards)

1
Q

Why are RNNs useful for Natural Language Processing (NLP)?

A

They process sequences, making them suitable for tasks involving word or character order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are common NLP tasks?

A

Text generation, sentiment analysis, and machine translation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a character-level RNN?

A

An RNN that predicts the next character in a sequence based on previous characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What dataset was used for training in the character RNN example?

A

The complete works of William Shakespeare.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are characters encoded for training in RNNs?

A

Using one-hot encoding or integer encoding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ‘truncated backpropagation through time’?

A

A technique to train RNNs on shorter sequences instead of full-length texts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the ‘temperature’ parameter control in text generation?

A

The randomness of the generated text; lower values make it more deterministic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between stateless and stateful RNNs?

A

Stateless resets state after each batch; stateful preserves state between batches.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why use a stateful RNN?

A

To maintain long-term dependencies over sequences across batches.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is sentiment analysis?

A

Classifying text based on emotional tone, e.g., positive or negative reviews.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What dataset is used for sentiment analysis in the lecture?

A

IMDb movie review dataset.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an embedding layer?

A

A layer that maps each word ID to a dense vector capturing semantic similarity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does ‘mask_zero=True’ do in an embedding layer?

A

Ignores padding tokens during training.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an encoder-decoder architecture used for?

A

Translation and sequence generation tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why is the input reversed in encoder-decoder models?

A

To make the first words more accessible to the decoder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a GRU cell?

A

A simplified version of LSTM with fewer gates and a single hidden state.

17
Q

How does an RNN generate long text?

A

By generating one character at a time and feeding the output back as input.

18
Q

What is the TimeDistributed layer used for?

A

To apply the same Dense layer across each time step.

19
Q

Why does character-level RNN have limited context?

A

Because it typically only looks back 100 characters.

20
Q

How can you improve a Char-RNN?

A

Use deeper networks, tune temperature, or increase training data.

21
Q

Why is dropout used in RNNs?

A

To prevent overfitting by randomly deactivating neurons during training.