DecodeAI
← Question Bank

Deep Learning & Generative AI

Neural Networks

Interview questions on Neural Networks.

134 questions

Perceptron

Q1. Neural network in simple Numpy.

Sign in to bookmark
  1. Write in plain NumPy the forward and backward pass for a two-layer feed-forward neural network with a ReLU layer in between.
  2. Implement vanilla dropout for the forward and backward pass in NumPy.

Perceptron

Q2. In a single-layer feed-forward NN, there are [...] input(s) and [...]. output layer(s) and no [...] connections at all.

Sign in to bookmark

Perceptron

Q3. In its simplest form, a perceptron (8.16) accepts only a binary input and emits a binary output. The output, can be evaluated as follows:

Sign in to bookmark

output={0,if j(wjxj+b)0,1,if j(wjxj+b)>0output = \begin{cases} 0, & \text{if } \sum_j(w_jx_j + b) \leq 0, \\ 1, & \text{if } \sum_j(w_jx_j + b) > 0 \end{cases} Where weights are denoted by wj and biases are denoted by b. Answer the following questions:

  1. True or False: If such a perceptron is trained using a labelled corpus, for each participating neuron the values wjw_j and bb are learned automatically.
  2. True or False: If we instead use a new perceptron (sigmoidal) defined as follows: σ(wx+b)\sigma(wx + b) where σ\sigma is the sigmoid function σ(z)=11+ez\sigma(z) = \frac{1}{1+e^{-z}} Then the new perceptron can process inputs ranging between 0 and 1 and emit output ranging between 0 and 1.

Perceptron

Q4. Write the cost function associated with the sigmoidial neuron.

Sign in to bookmark

Perceptron

Q5. Complete the sentence: To solve this mathematical equation, we have to apply $[...]$?

Sign in to bookmark

Perceptron

Q6. What does the following equation stands for?

Sign in to bookmark

C=1nxCx\nabla{C} = \frac{1}{n}\sum_x\nabla{C_x} Where: Cx=12y(x)a(x,w,b)2C_x = \frac{1}{2}\|y(x) - a(x,w,b)\|^2

Perceptron

Q7. Complete the sentence: Due to the time-consuming nature of computing gradients for each entry in the training corpus, modern DL libraries utilize a technique that gauges the gradient by first randomly sampling a subset from the training corpus, and then averaging only this subset in every epoch. This approach is known as $[...]$. The actual number of randomly chosen samples in each epoch is termed $[...]$. The gradient itself is obtained by an algorithm known as $[...]$.

Sign in to bookmark

Perceptron

Q8. The following questions refer to the MLP depicted in (9.1).The inputs to the MLP are $x1 = 0.9$ and $x2 = 0.7$ respectively, and the weights $w1 = −0.3$ and $w2 = 0.15$ respectively. There is a single hidden node, $H1$. The bias term,$ B1 $equals$0.001$.

Sign in to bookmark

Perceptron

Q9. The following questions refer to the MLP depicted in (8.15).

Sign in to bookmark
  1. Further to the above, the ReLU non-linear activation function g(z)=max0,zg(z) = max{0, z} is applied (8.15) to the output of the linear transformation. What is the value of the output (out2) now?

Perceptron

Q10. Activation functions.

Sign in to bookmark
  1. Draw the graphs for sigmoid, tanh, ReLU, and leaky ReLU.
  2. Pros and cons of each activation function.
  3. Is ReLU differentiable? What to do when it’s not differentiable?
  4. Derive derivatives for sigmoid function when is a vector.

Perceptron

Q11. Why shouldn’t we have two consecutive linear layers in a neural network?

Sign in to bookmark

Perceptron

Q12. Can a neural network with only RELU (non-linearity) act as a linear classifier?

Sign in to bookmark

Perceptron

Q13. Your co-worker, an postgraduate student at M.I.T, suggests using the following activa-

Sign in to bookmark

tion functions in a MLP. Which ones can never be back-propagated and why?

  1. f(x)=xf(x) = |x|2.f(x)=f(x) f(x) = f(x)3.f(x)={0,if x=0,xsin(1x),if x0. f(x)= \begin{cases} 0, & \text{if } x = 0, \\ x \sin\left(\frac{1}{x}\right), & \text{if } x \neq 0. \end{cases}4.f(x)={0if x=0xif x<0x2if x>0 f(x)= \begin{cases} 0 & \text{if } x = 0 \\ -x & \text{if } x < 0 \\ x^2 & \text{if } x > 0 \end{cases}

Perceptron

Q14. You are provided with the following MLP as depicted in 8.16.

Sign in to bookmark

Perceptron

Q15. If someone is quoted saying: MLP networks are universal function approximators. What does he mean?

Sign in to bookmark

Perceptron

Q16. **True or False**: the output of a perceptron is 0 or 1.

Sign in to bookmark

Perceptron

Q17. **True or False:** A multi-layer perceptron falls under the category of supervised machine learning.

Sign in to bookmark

Perceptron

Q18. **True or False:** The accuracy of a perceptron is calculated as the number of correctly

Sign in to bookmark

classified samples divided by the total number of incorrectly classified samples.

Perceptron

Q19. The following questions refer to the SLP depicted in (8.18). The weights in the SLP are $w1 = 1$ and $w2 = 1$ respectively. There is a single hidden node, H1. The bias term, B1 equals $−2.5$.

Sign in to bookmark

Perceptron

Q20. Repeat the above assuming now that the bias term B1 was amended and equals −0.25.

Sign in to bookmark

Perceptron

Q22. What was the most crucial difference between Rosenblatt’s original algorithm and Hinton’s fundamental papers of 1986: <a href="">Learning representations by back-propagating errors</a> and 2012:

Sign in to bookmark

ImageNet Classification with Deep Convolutional Neural Networks”

Perceptron

Q23. The AND logic gate is defined by the following table:

Sign in to bookmark

Perceptron

Q24. Design the smallest neural network that can function as an XOR gate.

Sign in to bookmark

Perceptron

Q25. The Sigmoid s(x) = 1 , also commonly known as the logistic function (Fig. 8.20), $s_c(x) = \frac{1}{1+e^-cx}$ is widely used in binary classification and as a neuron activation function in artificial neural networks. Typically, during the training of an ANN, a Sigmoid layer applies the Sigmoid function to elements in the forward pass, while in the backward pass the chain rule is being utilized as part of the backpropagation algorithm. In 8.20 the constant c was selected arbitrarily as 2 and 5 respectively.

Sign in to bookmark

Perceptron

Q26. The Hyperbolic tangent nonlinearity, or the tanh function (Fig. 8.23), is a widely used neuron activation function in artificial neural networks:

Sign in to bookmark

ftanh(x)=sinh(x)cosh(x)=exexex+exf_{tanh}(x) = \frac{sinh(x)}{cosh(x)} = \frac{e^x - e^-x}{e^x + e^-x}

Perceptron

Q27. The code snippet in 8.24 makes use of the tanh function.

Sign in to bookmark
  import torch
  nn001 = nn.Sequential(
  nn.Linear(200, 512),
  nn.Tanh(),
  nn.Linear(512, 512),
  nn.Tanh(),
  nn.Linear(512, 10),
  nn.LogSoftmax(dim=1)
  )
  1. What type of a neural network does nn001 in 8.24 represent?
  2. How many hidden layers does the layer entitles nn001 have?

Perceptron

Q28. Your friend, a veteran of the DL community claims that MLPs based on tanh activation function, have a symmetry around 0 and consequently cannot be saturated. Saturation, so he claims is a phenomenon typical of the top hidden layers in sigmoid based MLPs. Is he right or wrong?

Sign in to bookmark

Perceptron

Q29. If we initialize the weights of a tanh based NN, which of the following approaches will lead to the vanishing gradients problem?

Sign in to bookmark
  1. Using the normal distribution, with parameter initialization method as suggested by Kaiming [14].
  2. Using the uniform distribution, with parameter initialization method as suggested by Xavier Glorot [9].
  3. Initialize all parameters to a constant zero value.

Perceptron

Q30. You friend, who is experimenting with the tanh activation function designed a small CNN with only one hidden layer and a linear output (8.25):

Sign in to bookmark

Perceptron

Q31. The rectified linear unit, or ReLU $g(z) = max{0, z}$ is the default for many CNN architectures. It is defined by the following function:

Sign in to bookmark

fReLU=max(0,x)f_{ReLU} = max(0, x)

  1. In what sense is the ReLU better than traditional sigmoidal activation functions?

Perceptron

Q32. You are experimenting with the ReLU activation function, and you design a small CNN (8.26) which accepts an RGB image as an input. Each CNN kernel is denoted by $w$.

Sign in to bookmark

Perceptron

Q33. Name the following activation function where $a ∈ (0, 1)$:

Sign in to bookmark

f(x)={xif x>0axotherwisef(x) = \begin{cases} x & \text{if } x > 0 \\ ax & \text{otherwise} \end{cases}

Perceptron

Q34. In many interviews, you will be given a paper that you have never encountered before, and be required to read and subsequently discuss it. Please read <a href="https://arxiv.org/pdf/1710.05941.pdf">Searching for Activation Functions</a> before attempting the questions in this question.

Sign in to bookmark
  1. In, researchers employed an automatic pipeline for searching what exactly?
  2. What types of functions did the researchers include in their search space?
  3. What were the main findings of their research and why were the results surprising? 4. Write the formulae for the Swish activation function.
  4. Plot the Swish activation function.

Perceptron

Q35. Given an input of size of $n×n $, filters of size$ f×f $and a stride of$ s $with padding of$ p$, what is the output dimension?

Sign in to bookmark

Perceptron

Q36. Referring the code snippet in Fig. (8.31), answer the following questions regarding the VGG11 architecture [25]:

Sign in to bookmark
  import torchvision
  import torch
  def main():
  vgg11 = torchvision.models.vgg11(pretrained=True)
  vgg_layers = vgg11.features
  for param in vgg_layers.parameters():
  param.requires_grad = False
  example = [torch.rand(1, 3, 224, 224),
  torch.rand(1, 3, 512, 512),
  torch.rand(1, 3, 704, 1024)]
  vgg11.eval()
  for e in example:
    out=vgg_layers(e)
    print(out.shape)
  if __name__ == "__main__":
    main()^^I^^I
  1. In each case for the input variable example , determine the dimensions of the tensor which is the output of applying the VGG11 CNN to the respective input.
  2. Choose the correct option. The last layer of the VGG11 architecture is:
    1. Conv2d
    2. MaxPool2d
    3. ReLU

Perceptron

Q37. Still referring the code snippet in Fig. (8.31), and specifically to line 7, the code is amended so that the line is replaced by the line: `vgg_layers=vgg11.features[:3]`.

Sign in to bookmark
  1. What type of block is now represented by the new line? Print it using PyTorch. 2. In each case for the input variable example , determine the dimensions of the tensor which is the output of applying the block: vgg_layers=vgg11.features[:3] to the respective input.

Perceptron

Q38. Table (8.1) presents an incomplete listing of the of the VGG11 architecture [25]. As depicted, for each layer the number of filters (i. e., neurons with unique set of parameters) are presented.

Sign in to bookmark

Perceptron

Q39. A Dropout layer [26] (Fig. 8.32) is commonly used to regularize a neural network model by randomly equating several outputs (the crossed-out hidden node H) to 0.

Sign in to bookmark

Perceptron

Q40. A co-worker claims he discovered an equivalence theorem where, two consecutive Dropout layers [26] can be replaced and represented by a single Dropout layer 8.34.

Sign in to bookmark

Perceptron

Q41. If he uses the following filter for the convolutional operation, what would be the resulting

Sign in to bookmark

tensor after the application of the convolutional layer?

Perceptron

Q42. What would be the resulting tensor after the application of the ReLU layer (8.37)?

Sign in to bookmark

Perceptron

Q43. What would be the resulting tensor after the application of the MaxPool layer (8.78)?

Sign in to bookmark

Perceptron

Q44. The following input 8.38 is subjected to a MaxPool2D(2,2) operation having 2 × 2 max-pooling filter with a stride of 2 and no padding at all.

Sign in to bookmark

Perceptron

Q45. While reading a paper about the MaxPool operation, you encounter the following code snippet $9.1$ of a PyTorch module that the authors implemented. You download their pre- trained model, and evaluate its behaviour during inference:

Sign in to bookmark
import torch
from torch import nn
class MaxPool001(nn.Module):
    def __init__(self): 
        super(MaxPool001, self).__init__() 
        self.math = torch.nn.Sequential(
        torch.nn.Conv2d(3, 32, kernel_size=7, padding=2),
        torch.nn.BatchNorm2d(32),
        torch.nn.MaxPool2d(2, 2),
        torch.nn.MaxPool2d(2, 2),
        )
def forward(self, x):
     print (x.data.shape)
    x = self.math(x)
    print (x.data.shape)
    x = x.view(x.size(0), -1)
    print ("Final shape:{}",x.data.shape)
    return x
model = MaxPool001()
model.eval()
x = torch.rand(1, 3, 224, 224)
out=model.forward(x)

The architecture is presented in 9.2:

Perceptron

Q46. Weight normalization separates a weight vector’s norm from its gradient. How would it help with training?

Sign in to bookmark

Perceptron

Q47. In python, the probability density function for a normal distribution is given by 8.40:

Sign in to bookmark
import scipy
scipy.stats.norm.pdf(x, mu, sigma)
1. Without using Scipy, implement the normal distribution from scratch in Python.
2. Assume, you want to back propagate on the normal distribution, and therefore you need the derivative. Using Scipy write a function for the derivative.

Perceptron

Q48. Your friend, a novice data scientist, uses an RGB image (8.41) which he then subjects to BN as part of training a CNN.

Sign in to bookmark

Perceptron

Q49. **True or false**: An activation function applied after a Dropout, is equivalent to an activation function applied before a dropout.

Sign in to bookmark

Perceptron

Q50. Which of the following core building blocks may be used to construct CNNs? Choose all the options that apply:

Sign in to bookmark
  1. Pooling layers
  2. Convolutional layers
  3. Normalization layers
  4. Non-linear activation function
  5. Linear activation function

Perceptron

Q51. You are designing a CNN which has a single BN layer. Which of the following core CNN designs are valid? Choose all the options that apply:

Sign in to bookmark
  1. CONV→act→BN→Dropout→...
  2. CONV→act→Dropout→BN→...
  3. CONV→BN→act→Dropout→...
  4. BN→CONV→act→Dropout→...
  5. CONV→Dropout→BN→act→...
  6. Dropout→CONV→BN→act→...

Perceptron

Q52. The following operator is known as the Hadamard product:

Sign in to bookmark

OUT=ABOUT = A⊙B Where: (AB)i,j:=(A)i,j(B)i,j(A⊙B)i,j :=(A)i,j(B)i,j A scientist, constructs a Dropout layer using the following algorithm:

  1. Assign a probability of p for zeroing the output of any neuron.
  2. Accept an input tensor T , having a shape S
  3. Generate a new tensor T ‘ ∈ {0, 1}^S
  4. Assign each element in T‘a randomly and independently sampled value from a Bernoulli distribution: TiB(1,p)T‘i ∼ B(1,p)
  5. Calculate the OUT tensor as follows:OUT=TTOUT = T‘⊙TYou are surprised to find out that his last step is to multiply the output of a dropout layer with: 11p\frac{1}{1-p} Explain what is the purpose of multiplying by the term 11p\frac{1}{1-p}

Perceptron

Q53. Visualized in (8.43) from a high-level view, is an MLP which implements a well-known idiom in DL.

Sign in to bookmark

Perceptron

Q54. Answer the following questions regarding residual networks.

Sign in to bookmark
  1. Mathematically, the residual block may be represented by: y=x+F(x)y = x + F(x) What is the function F?
  2. In one sentence, what was the main idea behind deep residual networks (ResNets) as introduced in the original paper?

Perceptron

Q55. Your friend was thinking about ResNet blocks, and tried to visualize them in (8.45).

Sign in to bookmark

Training and Hyperparameters

Q56. A certain training pipeline for the classification of large images (1024 x 1024) uses the following Hyperparameters (8.46):

Sign in to bookmark

Initial learning rate 0.1 Weight decay 0.0001 Momentum 0.9 Batch size 1024

optimizer = optim.SGD(model.parameters(), lr=0.1, momentum=0.9,weight_decay=0.0001)
 ...
trainLoader = torch.utils.data.DataLoader(
    datasets.LARGE('../data', train=True, download=True, 7 transform=transforms.Compose([
    transforms.ToTensor(),
])),
batch_size=1024, shuffle=True)

In your opinion, what could possibly go wrong with this training pipeline?

Training and Hyperparameters

Q57. A junior data scientist in your team who is interested in Hyperparameter tuning, wrote the following code (8.5) for spiting his corpus into two distinct sets and fitting an LR model:

Sign in to bookmark
from sklearn.model_selection import train_test_split
dataset = datasets.load_iris()
X_train, X_test, y_train, y_test =
train_test_split(dataset.data, dataset.target, test_size=0.2) 
clf = LogisticRegression(data_norm=12)
clf.fit(X_train, y_train)

He then evaluated the performance of the trained model on the Xtest set.

  1. Explain why his methodology is far from perfect.
  2. Help him resolve the problem by utilizing a difference splitting methodology.
  3. Your friend now amends the code an uses:
clf = GridSearchCV(method, params, scoring='roc_auc', cv=5) clf.fit(train_X, train_y)

Explain why his new approach may work better?

Training and Hyperparameters

Q58. In the context of Hyperparameter optimization, explain the difference between grid search and random search.

Sign in to bookmark

Training and Hyperparameters

Q59. Non-invasive methods that forecast the existence of lung nodules (8.47), is a precursor to lung cancer. Yet, in spite of acquisition standardization attempts, the manual detection of lung nodules still remains predisposed to inter mechanical and observer variability. What is more, it is a highly laborious task.

Sign in to bookmark

Training and Hyperparameters

Q60. Answer the following questions regarding the validation curve visualized in (8.48):

Sign in to bookmark

Training and Hyperparameters

Q61. Learning rate.

Sign in to bookmark
  1. Draw a graph number of training epochs vs training error for when the learning rate is:
    1. too high
    2. too low
    3. acceptable.
  2. What’s learning rate warmup? Why do we need it?

Training and Hyperparameters

Q62. It’s a common practice for the learning rate to be reduced throughout the training.

Sign in to bookmark
  1. What’s the motivation?
    1. What might be the exceptions?

Training and Hyperparameters

Q63. Refer to the validation log-loss curve visualized in (8.49) and answer the following questions:

Sign in to bookmark

Training and Hyperparameters

Q64. Why don’t we just initialize all weights in a neural network to zero?

Sign in to bookmark

Training and Hyperparameters

Q65. You finished training a face recognition algorithm, which uses a feature vector of 128

Sign in to bookmark

elements. During inference, you notice that the performance is not that good. A friend tells you that in computer vision faces are gathered in various poses and perspectives. He there- fore suggests that during inference you would augment the incoming face five times, run inference on each augmented image and then fuse the output probability distributions by averaging.

  1. Name the method he is suggesting.
  2. Provide several examples of augmentation that you might use during inference.

Training and Hyperparameters

Q66. Complete the sentence: If the training loss is insignificant while the test loss is significantly higher, the network has almost certainly learned features which are not present in an `[...]` set. This phenomena is referred to as `[...]`

Sign in to bookmark

Training and Hyperparameters

Q67. What does the term stochastic in SGD actually mean? Does it use any random number generator?

Sign in to bookmark

Training and Hyperparameters

Q68. Stochasticity.

Sign in to bookmark
  1. What are some sources of randomness in a neural network?
  2. Sometimes stochasticity is desirable when training neural networks. Why is that?

Training and Hyperparameters

Q69. Gradient descent vs SGD vs mini-batch SGD.

Sign in to bookmark

Training and Hyperparameters

Q70. Write the vanilla gradient update.

Sign in to bookmark

Training and Hyperparameters

Q71. Explain why in SGD, the number of epochs required to surpass a certain loss threshold increases as the batch size decreases?

Sign in to bookmark

Training and Hyperparameters

Q72. It’s a common practice to train deep learning models using epochs: we sample batches from data without replacement. Why would we use epochs instead of just sampling data with replacement?

Sign in to bookmark

Training and Hyperparameters

Q73. Batch size.

Sign in to bookmark
  1. What happens to your model training when you decrease the batch size to 1?
  2. What happens when you use the entire training data in a batch?
  3. How should we adjust the learning rate as we increase or decrease the batch size?

Training and Hyperparameters

Q74. Vanishing and exploding gradients.

Sign in to bookmark
  1. How do we know that gradients are exploding? How do we prevent it?
  2. Why are RNNs especially susceptible to vanishing and exploding gradients?

Training and Hyperparameters

Q75. How does momentum work? Explain the role of exponential decay in the gradient descent update rule?

Sign in to bookmark

Training and Hyperparameters

Q76. Why is Adagrad sometimes favored in problems with sparse gradients?

Sign in to bookmark

Training and Hyperparameters

Q77. Adam vs. SGD.

Sign in to bookmark
  1. What can you say about the ability to converge and generalize of Adam vs. SGD?
  2. What else can you say about the difference between these two optimizers?

Training and Hyperparameters

Q78. With model parallelism, you might update your model weights using the gradients from each machine asynchronously or synchronously. What are the pros and cons of asynchronous SGD vs. synchronous SGD?

Sign in to bookmark

Training and Hyperparameters

Q79. In your training loop, you are using SGD and a logistic activation function which is

Sign in to bookmark

known to suffer from the phenomenon of saturated units.

  1. Explain the phenomenon.
  2. You switch to using the tanh activation instead of the logistic activation, in your opinion does the phenomenon still exists?
  3. In your opinion, is using the tanh function makes the SGD operation to converge better?

Training and Hyperparameters

Q80. Which of the following statements holds true?

Sign in to bookmark
  1. In stochastic gradient descent we first calculate the gradient and only then adjust weights for each data point in the training set.
  2. In stochastic gradient descent, the gradient for a single sample is not so different from the actual gradient, so this gives a more stable value, and converges faster.
  3. SGD usually avoids the trap of poor local minima.
  4. SGD usually requires more memory.

Training and Hyperparameters

Q81. Answer the following questions regarding norms.

Sign in to bookmark
  1. Which norm does the following equation represent? x1x2+y1y2|x1 − x2| + |y1 − y2|
  2. Which formulae does the following equation represent? i=1n(xiyi)2\sqrt{\sum_{i=1}^n(x_i - y_i)^2}
  3. When your read that someone penalized the L2 norm, was the euclidean or the Manhattan distance involved?
  4. Compute both the Euclidean and Manhattan distance of the vectors: x1x1 = [6,1,4,5] andx2 x2 = [2,8,3,−1].

Training and Hyperparameters

Q82. Why is squared L2 norm sometimes preferred to L2 norm for regularizing neural networks?

Sign in to bookmark

Training and Hyperparameters

Q83. You are provided with a pure Python code implementation of the Manhattan distance

Sign in to bookmark

function (8.51):

from scipy import spatial
x1=[6,1,4,5]
x2=[2,8,3,-1]
cityblock = spatial.distance.cityblock(x1, x2) 5 print("Manhattan:", cityblock)

In many cases, and for large vectors in particular, it is better to use a GPU for imple- menting numerical computations. PyTorch has full support for GPU’s (and its my favourite DL library ... ), use it to implement the Manhattan distance function on a GPU.

Training and Hyperparameters

Q84. Your friend is training a logistic regression model for a binary classification problem using the L2 loss for optimization. Explain to him why this is a bad choice and which loss he should be using instead.

Sign in to bookmark

Training and Hyperparameters

Q85. What’s the motivation for skip connection in neural works?

Sign in to bookmark

Training and Hyperparameters

Q86. When training a large neural network, say a language model with a billion parameters, you evaluate your model on a validation set at the end of every epoch. You realize that your validation loss is often lower than your train loss. What might be happening?

Sign in to bookmark

Training and Hyperparameters

Q87. Your model’ weights fluctuate a lot during training. How does that affect your model’s performance? What to do about it?

Sign in to bookmark

Training and Hyperparameters

Q88. Some models use weight decay: after each gradient update, the weights are multiplied by a factor slightly less than 1. What is this useful for?

Sign in to bookmark

Training and Hyperparameters

Q89. Dead neuron.

Sign in to bookmark
  1. What’s a dead neuron?
  2. How do we detect them in our neural network?
  3. How to prevent them?

Training and Hyperparameters

Q90. Pruning.

Sign in to bookmark
  1. Pruning is a popular technique where certain weights of a neural network are set to 0. Why is it desirable?
  2. How do you choose what to prune from a neural network?

Training and Hyperparameters

Q91. 1. What is batch normalization?

Sign in to bookmark
  1. The normal distribution is defined as follows: P(X)=1σ2πe(xμ)22σ2P(X) = \frac{1}{\sigma\sqrt{2\pi}}e^{\frac{-(x-\mu)^2}{2\sigma^2}} Generally i.i.d. XN(μ,σ2)X ∼ N (μ, σ2) however BN uses the standard normal distribution. What mean and variance does the standard normal distribution have?
  2. What is the mathematical process of normalization?
  3. Describe, how normalization works in BN.

Training and Hyperparameters

Q92. Compare batch norm and layer norm.

Sign in to bookmark

Training and Hyperparameters

Q93. Under what conditions would it be possible to recover training data from the weight checkpoints?

Sign in to bookmark

Training and Hyperparameters

Q94. Why do we try to reduce the size of a big trained model through techniques such as knowledge distillation instead of just training a small model from the beginning?

Sign in to bookmark

Training and Hyperparameters

Q95. You’re building a neural network and you want to use both numerical and textual features. How would you process those different features?

Sign in to bookmark

Regularization for deep learning

Q96. What is regularization and why is it important?

Sign in to bookmark

Regularization for deep learning

Q97. What are different kind of regularization techniques that we can use for deep neural networks?

Sign in to bookmark

Regularization for deep learning

Q98. Write the expression of cost function incase of parameter norm penalties?

Sign in to bookmark

Regularization for deep learning

Q99. What is the significant of hyperparameter $\alpha$ in regularized cost function?

Sign in to bookmark

Regularization for deep learning

Q100. Why do we typically penalize only the model's weights and not the biases in parameter norm penalties?

Sign in to bookmark

Regularization for deep learning

Q101. Should we use different penalty terms for each layer of neural networks?

Sign in to bookmark

Regularization for deep learning

Q102. Write the expression of objective function $J$ in case of $L^2$ regularization?

Sign in to bookmark

Regularization for deep learning

Q103. Why is the \(L^2\) parameter norm penalty referred to as weight decay?

Sign in to bookmark

Regularization for deep learning

Q104. Why do we usually regularize model parameters toward zero instead of a specific point?

Sign in to bookmark

Regularization for deep learning

Q105. Explain the impact of $L^2$ regularization on objective function of linear regression?

Sign in to bookmark

Regularization for deep learning

Q106. Write the expression for $L^1$ regularization on the model parameters $w$?

Sign in to bookmark

Regularization for deep learning

Q107. Compute the gradient of $L^1$ regularized objective function?

Sign in to bookmark

Regularization for deep learning

Q108. How does $L^1$ regularization results in more sparse parameters?

Sign in to bookmark

Regularization for deep learning

Q109. How do L1 and L2 regularization relate to Bayesian inference in the context of maximum a posteriori (MAP) estimation?

Sign in to bookmark

Regularization for deep learning

Q110. What is the main motivation behind using data augmentation techniques?

Sign in to bookmark

Regularization for deep learning

Q111. State the some use cases where we can use data augmentation techniques?

Sign in to bookmark

Regularization for deep learning

Q112. State some data augmentation techniques?

Sign in to bookmark

Regularization for deep learning

Q114. Why do we need label smoothing?

Sign in to bookmark

Regularization for deep learning

Q115. When do we use label smoothing?

Sign in to bookmark

Regularization for deep learning

Q116. How do we choose $\alpha$ or $\eta$?

Sign in to bookmark

Regularization for deep learning

Q117. What challenges arise when using maximum likelihood learning with a softmax classifier and hard targets?

Sign in to bookmark

Regularization for deep learning

Q118. What is multitask learning?

Sign in to bookmark

Regularization for deep learning

Q119. How does multitask learning prevents overfitting?

Sign in to bookmark

Regularization for deep learning

Q120. What is early stopping in machine learning?

Sign in to bookmark

Regularization for deep learning

Q121. How do you implement early stopping in a training process?

Sign in to bookmark

Regularization for deep learning

Q122. What criteria would you use for early stopping?

Sign in to bookmark

Regularization for deep learning

Q123. What are the benefits of using early stopping as regularizer over other methods like weight decay?

Sign in to bookmark

Regularization for deep learning

Q124. How does bagging technique help in reducing generalization error?

Sign in to bookmark

Regularization for deep learning

Q125. What are the challenges associated with using the bagging method with neural networks to prevent overfitting?

Sign in to bookmark

Regularization for deep learning

Q126. Show all the possible subnetworks that can be formed by dropping ot diffrent subsets of the units from the given base network?

Sign in to bookmark

Regularization for deep learning

Q127. **[True/False]** Does dropout aim to approximate the bagging method for neural networks?

Sign in to bookmark

Regularization for deep learning

Q128. How does the dropout technique contrast with the bagging method?

Sign in to bookmark

Regularization for deep learning

Q129. Which types of models can utilize the dropout technique?

Sign in to bookmark

Regularization for deep learning

Q130. State the weight scaling inference rule in case of dropout method?

Sign in to bookmark

Regularization for deep learning

Q131. How does weight scaling rule works?

Sign in to bookmark

Regularization for deep learning

Q133. What impact does dropout have on the learning of representations in neural networks?

Sign in to bookmark

Regularization for deep learning

Q134. When building a neural network, should you overfit or underfit it first?

Sign in to bookmark