Deep Learning Interview Questions and Answers
Question - 101 : - Why does the exploding gradient problem happen?
Answer - 101 : -
When the model weights grow exponentially and become unexpectedly large in the end when training the model, exploding gradient problem happens. In a neural network with n hidden layers, n derivatives are multiplied together. If the weights that are multiplied are greater than 1 then the gradient increases exponentially greater than the usual one and eventually explodes as you propagate through the model. The situation wherein the value of weights is more than 1 makes the output exponentially larger hindering the model training and impacting the overall accuracy of the model is referred to as the exploding gradients problem. Exploding gradients is a serious problem because the model cannot learn from its training data resulting in a poor loss. One can deal with the exploding gradient problem either by gradient clipping, weight regularization, or with the use of LSTM’s.
Question - 102 : - How to fix the constant validation accuracy in CNN model training?
Answer - 102 : -
Constant validation accuracy is a common problem when training any neural network because the network just remembers the sample and results in an overfitting problem. Overfitting of a model means that the neural network model works fantastic on the training sample but the performance of the model sinks in on the validation set. Here are some tips to try to fix the constant validation accuracy in CNN –
- It is always advisable to divide the dataset into training, validation, and test set.
- When working with little data, this problem can be solved by changing the parameters of the neural network by trial and error.
- Increasing the size of the training dataset.
- Use batch normalization.
- Regularization
- Reduce the network complexity
Question - 103 : - What do you understand by learning rate in a neural network model? What happens if the learning rate is too high or too low?
Answer - 103 : -
Learning rate is one of the most important configurable hyperparameters used in the training of a neural network. The value of the learning rate lies between 0 and 1. Choosing the learning rate is one of the most challenging aspects of training a neural network because it is the parameter that controls how quickly or slowly a neural network model adapts to a given problem and learns. A higher learning rate value means that the model requires few training epochs and results in rapid changes while a smaller learning rate implies that the model will take a long time to converge or might never converge and get stuck on a suboptimal solution. Thus, it is advisable not to use a learning rate that is too low or too high but instead a good learning rate value should be discovered through trial and error.
Question - 104 : - Can you train a neural network model by initializing all biases as 0?
Answer - 104 : -
Yes, there is a possibility that the neural network model will learn even if all the biases are initialized to 0.
Question - 105 : - Can you train a neural network model by initializing all the weights to 0?
Answer - 105 : -
No, it is not possible to train a model by initializing all the weights to 0 because the neural network will never learn to perform a given task. Initializing all weights to zeros will cause the derivatives to remain the same for every w in W [1] because of which neurons will learn the same features in every iteration. Not just 0, but any kind of constant initialization of weights is likely to produce a poor result.