Wednesday 27 December 2023

Deep Learning and Reinforcement Learning Week 6 All Quiz

Practice: Recurrent Neural Networks 

1. (True/False) Recurrent Neural Networks are a class of neural networks that allow previous outputs to be used as inputs while having hidden states.



ANSWER= (A) True

 

2. (True/False) Recurrent Neural Networks are well suited in applications in which the context is important and needs to be incorporated in the prediction.



ANSWER= (A) True

 

3. These are the two main outputs of a recurrent neural network:





ANSWER= (A) Prediction and state


Practice: LSTM and GRU  

1. (True/False) The main motivation behind LSTM is to make it easier to keep information from distant past in current memory without reinforcement.



ANSWER= (A) True

 

2. RNNs are augmented with the following Gate Units:





ANSWER= (B) Input gate, forget gate, output gate

 

3. Select the correct assertion regarding the gate units of RNNs:





ANSWER= (D) A and B

 


Practice: Regularization  

1. Which regularization technique can shrink the coefficients of the less important features to zero?





ANSWER= (D) L1

 

2. (True/False) Batch Normalization tackles the internal covariate shift issue by always normalizing the input signals, thus accelerating the training of deep neural nets and increasing the generalization power of the networks.



ANSWER= (A) True

 

3. Regularization is used to mitigate which issue in model training?





ANSWER= (C) Overfitting

 


Week 6 Final Quiz  

1. (True/False) RNN models are mostly used in the fields of natural language processing and speech recognition.



ANSWER= (A) True

 

2. (True/False) GRUs and LSTM are a way to deal with the vanishing gradient problem encountered by RNNs.



ANSWER= (A) True

 

3. (True/False) GRUs will generally perform about as well as LSTMs with shorter training time, especially for smaller datasets.



ANSWER= (A) True

 

4. (True/False) The main idea of Seq2Seq models is to improve accuracy by keeping necessary information in the hidden state from one sequence to the next.



ANSWER= (A) True

 

5. (True/False) The main parts of a Seq2Seq model are: an encoder, a hidden state, a sequence state, and a decoder.



ANSWER= (B) False

 

6. Select the correct option, in the context of Seq2Seq models:





ANSWER= (C) The Greedy Search algorithm selects one best candidate as an input sequence for each time step while the Beam Search produces multiple different hypothesis based on conditional probability.

 

7. Which is the gating mechanism for RNNs that include a reset gate and an update gate?





ANSWER= (A) GRUs

8. LSTM models are among the most common Deep Learning models used in forecasting. These are other common uses of LSTM models, except:







ANSWER= (D) Generating Images

Deep Learning and Reinforcement Learning Week 5 All Quiz

Practice: Transfer Learning 

1. The main idea of transfer learning of a neural network is:





ANSWER= (A) To keep the early layers of a pre-trained network and re-train the later layers for a specific application.

 

2. In the context of transfer learning, which is a guiding principle of fine tuning?





ANSWER= (B) Using data that is similar to the pre-trained network

 

3. In the context of transfer learning, what do we call the process in which you only train the last or a few layers instead of all layers of a neural network?





ANSWER= (A) Frozen layers


Practice: Convolutional Neural Network Architectures  

1. This concept came as a solution to CNNs in which each layer is turned into branches of convolutions:





ANSWER= (A) Inception

 

2. Which CNN Architecture is considered the flash point for modern Deep Learning?






ANSWER= (A) AlexNet

 

3. Which CNN Architecture can be described as a "simplified, deeper LeNet" in which the more layers, the better?






ANSWER= (C) VGG

4. Which CNN Architecture is the precursor of using convolutions to obtain better features and was first used to solve the MNIST data set?






ANSWER= (E) LeNet

 

5. The motivation behind this CNN Architecture was to solve the inability of deep neural networks to fit or overfit the training data better when adding layers.






ANSWER= (E) ResNet

 

6. This CNN Architecture keeps passing both the initial unchanged information and the transformed information to the next layer.






ANSWER= (E) ResNet

 

7. Which activation function was notably used in AlexNet and contributed to its success?





ANSWER= (A) ReLU (Rectified Linear Unit)

 


Practice: Regularization  

1. Which regularization technique can shrink the coefficients of the less important features to zero?





ANSWER= (D) L1

 

2. (True/False) Batch Normalization tackles the internal covariate shift issue by always normalizing the input signals, thus accelerating the training of deep neural nets and increasing the generalization power of the networks.



ANSWER= (A) True

 

3. Regularization is used to mitigate which issue in model training?





ANSWER= (C) Overfitting

 


Week 5 Final Quiz  

1. (True/False) In Keras, the Dropout layer has an argument called rate, which is a probability that represents how often we want to invoke the layer in the training.



ANSWER= (B) False

 

2. What is a benefit of applying transfer learning to neural networks?





ANSWER= (B) Save early layers for generalization before re-training later layers for specific applications.

 

3. By setting ` layer.trainable = False` for certain layers in a neural network, we____





ANSWER= (D) freeze the layers such that their weights don’t update during training.

 

4.Which option correctly orders the steps of implementing transfer learning?
1. Freeze the early layers of the pre-trained model.
2. Improve the model by fine-tuning.
3. Train the model with a new output layer in place.
4. Select a pre-trained model as the base of our training.





ANSWER= (B) 4, 1, 3, 2

 

5. Given a 100x100 pixels RGB image, there are _____ features.





ANSWER= (C) 30000

 

6. Before a CNN is ready for classifying images, what layer must we add as the last?





ANSWER= (A) Dense layer with the number of units corresponding to the number of classes

 

7. In a CNN, the depth of a layer corresponds to the number of:





ANSWER= (A) filters applied

Tuesday 26 December 2023

Deep Learning and Reinforcement Learning Week 4 All Quiz

Practice: Convolutional Neural Networks 

1. Given the syntax below, select the option that will best improve a CNN model that you are trying to fit.
1. model.fit(x_train, y_train, batch_size=batch_size, epochs=100, validation_data=(x_test, y_test))





ANSWER= (D) Add shuffling, by adding “, shuffle=True” at the end.

 

2. Which of the following statements is TRUE about a kernel in a Convolutional Layer applied to an image?





ANSWER= (B) Kernels detect local features in an image such as lines, corners, and edges.


Week 4 Final Quiz  

1. What is the main function of backpropagation when training a Neural Network?





ANSWER= (B) Make adjustments to the weights

 

2. (True/False) The “vanishing gradient” problem can be solved using a different activation function



ANSWER= (A) True

 

3. (True/False) Every node in a neural network has an activation function.



ANSWER= (B) False

 

4. These are all activation functions except:





ANSWER= (C) Leaky hyperbolic tangent

 

5. Deep Learning uses deep Neural Networks for all these uses, except





ANSWER= (C) Cases in which explainability is the main objective

 

6. These are all activation functions except:





ANSWER= (D) Pruning

 

7. (True/False) Optimizer approaches for Deep Learning Regularization use gradient descent:



ANSWER= (B) False

 

8. Stochastic gradient descent is this type of batching method:





ANSWER= (A) online learning

 

9. (True/False) The main purpose of data shuffling during the training of a Neural Network is to aid convergence and use the data in a different order each epoch.



ANSWER= (A) True

 

10. Which of the following IS NOT a benefit of Transfer Learning?





ANSWER= (C) Improving the speed at which large models can be trained from scratch

 

14. Which of the following statements about using a Pooling Layer is TRUE?





ANSWER= (A) Pooling can reduce both computational complexity and overfitting.

Deep Learning and Reinforcement Learning Week 3 All Quiz

Practice: Optimizers and Data Shuffling 

1. True/False. Multi-layer perceptrons always have a hidden layer.



ANSWER= (A) True

 

2. True/False. Multi-layer perceptrons are considered a type of feedforward neural network.



ANSWER= (A) True

 

3. Select the correct rule of thumb regarding training a neural network. In general, as you train a neural network:





ANSWER= (B) The log loss decreases and the accuracy increases


Week 3 Final Quiz  

1. What is the main function of backpropagation when training a Neural Network?





ANSWER= (B) Make adjustments to the weights

 

2. (True/False) The “vanishing gradient” problem can be solved using a different activation function



ANSWER= (A) True

 

3. (True/False) Every node in a neural network has an activation function.



ANSWER= (B) False

 

4. These are all activation functions except:





ANSWER= (C) Leaky hyperbolic tangent

 

5. Deep Learning uses deep Neural Networks for all these uses, except





ANSWER= (C) Cases in which explainability is the main objective

 

6. These are all activation functions except:





ANSWER= (D) Pruning

 

7. (True/False) Optimizer approaches for Deep Learning Regularization use gradient descent:



ANSWER= (B) False

 

8. Stochastic gradient descent is this type of batching method:





ANSWER= (A) online learning

 

9. (True/False) The main purpose of data shuffling during the training of a Neural Network is to aid convergence and use the data in a different order each epoch.



ANSWER= (A) True

 

10. This is a high-level library that is commonly used to train deep learning models and runs on either TensorFlow or Theano:





ANSWER= (B) Keras

Deep Learning and Reinforcement Learning Week 2 All Quiz

Practice: Back Propagation, Activation Functions 

1. Select the method or methods that best help you find the same results as using matrix linear algebra to solve the equation θ=(XTX)−1XTy





ANSWER= (D) All the above

 

2. (True/False) Neurons can be used as logic gates



ANSWER= (A) True

 

3. (True/False) The feed-forward computation of a neural network can be thought of as matrix calculations and activation functions.



ANSWER= (A) True


Practice: Keras Library 

1. Building a Neural Network with the Sequential API in Keras implies that each layer





ANSWER= (C) can connect to only the previous and next layers.

 

2. An epoch in estimating a Deep Learning model refers to





ANSWER= (D) the number of times the entire input data set is used by the model.

 

3. An advantage of the Sigmoid activation function over the step activation function is:





ANSWER= (C) improved backpropagation due to nonzero gradients.


Week 2 Final Quiz  

1. The backpropagation algorithm updates which of the following?





ANSWER= (A) The parameters only.

 

2. What of the following about the activation functions is true?





ANSWER= (A) They add non-linearity into the model, allowing the model to learn complex pattern.

 

3. What is true regarding the backpropagation rule?





ANSWER= (B) The actual output is determined by computing the output of neurons in each hidden layer

 

4. Which option correctly lists the steps to build a linear regression model using Keras?
1. Use `fit()` and specify the number of epochs to train the model for.
2. Create a Sequential model with the relevant layers.
3. Normalize the features with ` layers.Normalization()` and apply `adapt()`.
4. Compile using `model.compile()` with specified optimizer and loss.





ANSWER= (A) 3, 2, 4, 1

 

5. (True/False) Keras provides one approach to build a model: by defining a Sequential model.



ANSWER= (B) False

Monday 25 December 2023

Deep Learning and Reinforcement Learning Week 1 All Quiz

Practice: Introduction to Neural Networks 

1. Neural networks and Deep Learning are behind many of the AI applications that are part of our daily lives.



ANSWER= (A) True

 

2. Which one of the following is true in terms of the difference between grid search and randomized search?





ANSWER= (C) Randomized search selects random combinations of parameters to train a model, whereas grid search goes through all combinations.

 

3. This is a characteristic that neural networks and logistic regression have in common:





ANSWER= (C) the weights, inputs, and bias of neural networks are the equivalent to the coefficients, variables, and constant of a logistic regression


Practice: Optimization and Gradient Descent 

1. Select all the methods that can be used to minimize a cost function:




ANSWER= ( A) mini-batch gradient descent
(B) stochastic gradient descent
(C) batch gradient descent


 

2. How many sample(s) are used in a stochastic gradient descent?





ANSWER= (A) 1

 

3. Which method uses all the samples in one iteration to update model parameters?




ANSWER= (A) Batch gradient descent


Week 1 Finall Quiz  

1. What is another name for the “neuron” on which all neural networks are based?





ANSWER= (D) perceptron

 

2. What is an advantage of using a network of neurons?





ANSWER= (B) A network of neurons can represent a non-linear decision boundary.

 

3. A dataset with 8 features would have how many nodes in the input layer?





ANSWER= (D) 8

 

4. For a single data point, the weights between an input layer with 3 nodes and a hidden layer with 4 nodes can be represented by a:





ANSWER= (B) 3 x 4 matrix.

 

5. Use the following image for reference. How many hidden layers are in this Neural Network?

neural network






ANSWER= (A) Two

 

6. Use the following image for reference. How many hidden units are in this Neural Network?

neural network






ANSWER= (C) Eight

 

7. Which statement is TRUE about the relationship between Neural Networks and Logistic Regression?





ANSWER= (D) A single-layer Neural Network can be parameterized to generate results equivalent to Linear or Logistic Regression.

Pascal's Triangle Visualization About Pascal's Triangle Pascal'...