Data Science Deep Learning and Neural Networks 2 — Questions and Answers
Question 1: Which type of neural network architecture is specifically designed to handle sequential data such as time series or text?
- Convolutional Neural Network (CNN)
- Recurrent Neural Network (RNN) (Correct answer)
- Autoencoder
- Generative Adversarial Network (GAN)
Correct answer: Recurrent Neural Network (RNN)
RNNs maintain a hidden state that captures information from previous time steps, making them suited for sequential dependencies.
Question 2: What is the key innovation of Long Short-Term Memory (LSTM) networks compared to standard RNNs?
- They use convolutional layers for faster computation
- They include gating mechanisms to control information flow and address long-range dependencies (Correct answer)
- They require no backpropagation
- They replace the hidden state with attention scores
Correct answer: They include gating mechanisms to control information flow and address long-range dependencies
LSTMs use input, forget, and output gates to selectively retain or discard information, solving the vanishing gradient problem in long sequences.
Question 3: In the context of deep learning, what does 'transfer learning' mean?
- Moving a trained model to a different hardware platform
- Using a pre-trained model's learned representations as a starting point for a new task (Correct answer)
- Transferring data between training and test sets
- Sharing weights between parallel training jobs
Correct answer: Using a pre-trained model's learned representations as a starting point for a new task
Transfer learning reuses weights from a model trained on a large dataset, fine-tuning them on a smaller target dataset to save time and improve accuracy.
Question 4: What is the purpose of batch normalization in a neural network?
- To increase the number of trainable parameters
- To normalize layer inputs to reduce internal covariate shift and speed up training (Correct answer)
- To randomly drop batches during training
- To apply L2 regularization to each batch
Correct answer: To normalize layer inputs to reduce internal covariate shift and speed up training
Batch normalization normalizes activations within each mini-batch, stabilizing training and often allowing higher learning rates.
Question 5: Which loss function is most appropriate for a multi-class classification problem with a softmax output layer?
- Mean Squared Error
- Binary Cross-Entropy
- Categorical Cross-Entropy (Correct answer)
- Hinge Loss
Correct answer: Categorical Cross-Entropy
Categorical cross-entropy measures the divergence between the predicted probability distribution and the true one-hot encoded label across multiple classes.
Question 6: What does a Generative Adversarial Network (GAN) consist of?
- An encoder and a decoder
- A generator and a discriminator trained in opposition (Correct answer)
- A policy network and a value network
- A feature extractor and a classifier
Correct answer: A generator and a discriminator trained in opposition
GANs pit a generator that creates synthetic samples against a discriminator that distinguishes real from fake, training both through adversarial feedback.
Which type of neural network architecture is specifically designed to handle sequential data such as time series or text?