Posts

Showing posts with the label Neural Network

Neural Network 3

Image
  Q1. Complete the code For the above code implementation of forward and backward propagation for the sigmoid function, complete the backward pass [ ???? ] to compute analytical gradients. Note:  grad in backward is actually the output error gradients. Choose the correct answer from below: A.      grad_input = self.sig * (1-self.sig) * grad B.      grad_input = self.sig / (1-self.sig) * grad C.       grad_input = self.sig / (1-self.sig) + grad D.      grad_input = self.sig + (1-self.sig) - grad Ans: A Correct Answer :  grad_input = self.sig * (1-self.sig) * grad Explanation :  The  grad_input  will be given by : dZ  = The error introduced by input Z. dA  = The error introduced by output A. σ(x) · 1 − σ(x)  = The derivative of the Sigmoid activation function. where σ(x) represents the sigmoid function. Q2. Trained Perceptron A perceptron was trained to distinguish between two classes, "+1" and "-1". The result is

Neural network 4

Image
  Q1. Tanh and Leaky ReLu Which of the following statements with respect to Leaky ReLu and Tanh are true? a.  When the derivative becomes zero in the case of negative values in ReLu, no learning happens which is rectified in Leaky ReLu. b.  Tanh is a zero-centered activation function. c.  Tanh produces normalized inputs for the next layer which makes training easier. d.  Tanh also has the vanishing gradient problem. Choose the correct answer from below: A.      All the mentioned statements are true. B.      All the mentioned statements are true except c. C.       All the mentioned statements are true except b. D.      All the mentioned statements are true except d. Ans: A Correct options: All the mentioned statements are true. Explanation : 1) The problem of no learning in the case of ReLu is called dying ReLu which Leaky ReLu takes care of. 2) Yes, tanh is a zero-centered activation function. 3) As the Tanh is symmetric and the mean is around zero it p

Neural Network 2

Image
Q1. Neuron Which of the following is true about a single artificial neuron? Choose the correct answer from below , please note that this question may have multiple correct answers A.      It is loosely inspired from biological neurons B.      It computes weighted sum C.       It applies an activation function D.      It is capable of performing multi class classification Ans: A,B,C Correct Options:- It is loosely inspired from biological neurons It computes weighted sum It applies an activation function Explanation:- The basic inspiration for artificaial neurons did come from biological neurons. Biological neurons form a network a network within themselves. Each connection, like the synapses in a biological brain, can transmit a signal to other neurons. An artificial neuron receives signals then processes them and can signal neurons connected to it. A neuron does it’s computation in 2 steps: First it comput