原文:
介绍
早在2009年,深度学习只是一个新兴领域。只有少数人认为它是一个富有成果的研究领域。今天,它被用于开发一些被认为是难以做到的事情的应用程序。
语音识别,图像识别,数据集中的查找模式,照片中的对象分类,字符文本生成,自驾车等等只是几个例子。因此,熟悉深度学习及其概念很重要。
在这次技能测试中,我们测试了我们的社区关于深度学习的基本概念。共有1070人参加了这项技能测试。
如果你错过了考试,你可以看看这些问题并检查你的技能水平。
总体成绩
以下是分数的分布,这将有助于您评估您的表现:
您可以在这里访问您的演出。超过200人参加了技能测试,最高分为35.以下是关于分配的一些统计数据。
Overall distribution
Mean Score: 16.45
Median Score: 20
Mode Score: 0
看起来很多人很晚就开始了比赛,也没有超出几个问题。我不完全确定为什么,但可能是因为这个问题是为了很多观众而进步的。
有用的资源
深入学习的基础 - 从人工神经网络开始:
在Python中实现神经网络的实用指南(使用Theano):
https://www.analyticsvidhya.com/blog/2016/04/neural-networks-python-theano/
Python深入学习入门的完整指南:
https://www.analyticsvidhya.com/blog/2016/08/deep-learning-path/
教程:使用Keras优化神经网络(使用图像识别案例研究):
使用TensorFlow实现神经网络的介绍:
问题与解答
Q1. A neural network model is said to be inspired from the human brain.
The neural network consists of many neurons, each neuron takes an input, processes it and gives an output. Here’s a diagrammatic representation of a real neuron.
Which of the following statement(s) correctly represents a real neuron?
A. A neuron has a single input and a single output only
B. A neuron has multiple inputs but a single output only
C. A neuron has a single input but multiple outputs
D. A neuron has multiple inputs and multiple outputs
E. All of the above statements are valid
Solution: (E)
A neuron can have a single Input / Output or multiple Inputs / Outputs.
Q2. Below is a mathematical representation of a neuron.
The different components of the neuron are denoted as:
- x1, x2,…, xN: These are inputs to the neuron. These can either be the actual observations from input layer or an intermediate value from one of the hidden layers.
- w1, w2,…,wN: The Weight of each input.
- bi: Is termed as Bias units. These are constant values added to the input of the activation function corresponding to each weight. It works similar to an intercept term.
- a: Is termed as the activation of the neuron which can be represented as
- and y: is the output of the neuron
Considering the above notations, will a line equation (y = mx + c) fall into the category of a neuron?
A. Yes
B. No
Solution: (A)
A single neuron with no non-linearity can be considered as a linear regression function.
Q3. Let us assume we implement an AND function to a single neuron. Below is a tabular representation of an AND function:
X1 | X2 | X1 AND X2 |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
The activation function of our neuron is denoted as:
What would be the weights and bias?
(Hint: For which values of w1, w2 and b does our neuron implement an AND function?)
A. Bias = -1.5, w1 = 1, w2 = 1
B. Bias = 1.5, w1 = 2, w2 = 2
C. Bias = 1, w1 = 1.5, w2 = 1.5
D. None of these
Solution: (A)
A.
- f(-1.5*1 + 1*0 + 1*0) = f(-1.5) = 0
- f(-1.5*1 + 1*0 + 1*1) = f(-0.5) = 0
- f(-1.5*1 + 1*1 + 1*0) = f(-0.5) = 0
- f(-1.5*1 + 1*1+ 1*1) = f(0.5) = 1
Therefore option A is correct
Q4. A network is created when we multiple neurons stack together. Let us take an example of a neural network simulating an XNOR function.
You can see that the last neuron takes input from two neurons before it. The activation function for all the neurons is given by:
Suppose X1 is 0 and X2 is 1, what will be the output for the above neural network?
A. 0
B. 1
Solution: (A)
Output of a1: f(0.5*1 + -1*0 + -1*1) = f(-0.5) = 0
Output of a2: f(-1.5*1 + 1*0 + 1*1) = f(-0.5) = 0
Output of a3: f(-0.5*1 + 1*0 + 1*0) = f(-0.5) = 0
So the correct answer is A
Q5. In a neural network, knowing the weight and bias of each neuron is the most important step. If you can somehow get the correct value of weight and bias for each neuron, you can approximate any function. What would be the best way to approach this?
A. Assign random values and pray to God they are correct
B. Search every possible combination of weights and biases till you get the best value
C. Iteratively check that after assigning a value how far you are from the best values, and slightly change the assigned values values to make them better
D. None of these
Solution: (C)
Option C is the description of gradient descent.
Q6. What are the steps for using a gradient descent algorithm?
- Calculate error between the actual value and the predicted value
- Reiterate until you find the best weights of network
- Pass an input through the network and get values from output layer
- Initialize random weight and bias
- Go to each neurons which contributes to the error and change its respective values to reduce the error
A. 1, 2, 3, 4, 5
B. 5, 4, 3, 2, 1
C. 3, 2, 1, 5, 4
D. 4, 3, 1, 5, 2
Solution: (D)
Option D is correct
Q7. Suppose you have inputs as x, y, and z with values -2, 5, and -4 respectively. You have a neuron ‘q’ and neuron ‘f’ with functions:
q = x + y
f = q * z
Graphical representation of the functions is as follows:
What is the gradient of F with respect to x, y, and z?
(HINT: To calculate gradient, you must find (df/dx), (df/dy) and (df/dz))
A. (-3,4,4)
B. (4,4,3)
C. (-4,-4,3)
D. (3,-4,-4)
Solution: (C)
Option C is correct.
Q8. Now let’s revise the previous slides. We have learned that:
- A neural network is a (crude) mathematical representation of a brain, which consists of smaller components called neurons.
- Each neuron has an input, a processing function, and an output.
- These neurons are stacked together to form a network, which can be used to approximate any function.
- To get the best possible neural network, we can use techniques like gradient descent to update our neural network model.
Given above is a description of a neural network. When does a neural network model become a deep learning model?
A. When you add more hidden layers and increase depth of neural network
B. When there is higher dimensionality of data
C. When the problem is an image recognition problem
D. None of these
Solution: (A)
More depth means the network is deeper. There is no strict rule of how many layers are necessary to make a model deep, but still if there are more than 2 hidden layers, the model is said to be deep.
Q9. A neural network can be considered as multiple simple equations stacked together. Suppose we want to replicate the function for the below mentioned decision boundary.
Using two simple inputs h1 and h2
What will be the final equation?
A. (h1 AND NOT h2) OR (NOT h1 AND h2)
B. (h1 OR NOT h2) AND (NOT h1 OR h2)
C. (h1 AND h2) OR (h1 OR h2)
D. None of these
Solution: (A)
As you can see, combining h1 and h2 in an intelligent way can get you a complex equation easily. Refer Chapter 9 of this book
Q10. “Convolutional Neural Networks can perform various types of transformation (rotations or scaling) in an input”. Is the statement correct True or False?
A. True
B. False
Solution: (B)
Data Preprocessing steps (viz rotation, scaling) is necessary before you give the data to neural network because neural network cannot do it itself.
Q11. Which of the following techniques perform similar operations as dropout in a neural network?
A. Bagging
B. Boosting
C. Stacking
D. None of these
Solution: (A)
Dropout can be seen as an extreme form of bagging in which each model is trained on a single case and each parameter of the model is very strongly regularized by sharing it with the corresponding parameter in all the other models. Refer here
Q 12. Which of the following gives non-linearity to a neural network?
A. Stochastic Gradient Descent
B. Rectified Linear Unit
C. Convolution function
D. None of the above
Solution: (B)
Rectified Linear unit is a non-linear activation function.
Q13. In training a neural network, you notice that the loss does not decrease in the few starting epochs.
The reasons for this could be:
- The learning is rate is low
- Regularization parameter is high
- Stuck at local minima
What according to you are the probable reasons?
A. 1 and 2
B. 2 and 3
C. 1 and 3
D. Any of these
Solution: (D)
The problem can occur due to any of the reasons mentioned.
Q14. Which of the following is true about model capacity (where model capacity means the ability of neural network to approximate complex functions) ?
A. As number of hidden layers increase, model capacity increases
B. As dropout ratio increases, model capacity increases
C. As learning rate increases, model capacity increases
D. None of these
Solution: (A)
Only option A is correct.
Q15. If you increase the number of hidden layers in a Multi Layer Perceptron, the classification error of test data always decreases. True or False?
A. True
B. False
Solution: (B)
This is not always true. Overfitting may cause the error to increase.
Q16.You are building a neural network where it gets input from the previous layer as well as from itself.