machine learning week04 exercises

machine learning week04 exercises_第1张图片

Which of the following statements are true? Check all that apply.

Suppose you have a multi-class classification problem with three classes, trained with a 3 layer network. Let a^{(3)}1 = (h\Theta(x))1a1(3)=(hΘ(x))1 be the activation of the first output unit, and similarly a^{(3)}_2 = (h\Theta(x))2a2(3)=(hΘ(x))2 and a^{(3)}_3 = (h\Theta(x))_3a3(3)=(hΘ(x))3. Then for any input xx, it must be the case that a^{(3)}_1 + a^{(3)}_2 + a^{(3)}_3 = 1a1(3)+a2(3)+a3(3)=1.
two layer (one input layer, one output layer; no hidden layer) neural network can represent the XOR function.
Any logical function over binary-valued (0 or 1) inputs x_1x1 and x_2x2 can be (approximately) represented using some neural network.
The activation values of the hidden units in a neural network, with the sigmoid activation function applied at every layer, are always in the range (0, 1). 
答案:CD 
解析: 
A选项:每一层的节点都是通过前一层计算而来,同层节点互不影响,加上softmax才会影响。 
B选项:XOR异或,需要通过叠加产生。
 machine learning week04 exercises_第2张图片
2.Consider the following neural network which takes two binary-valued inputs x1,x2∈{0,1} and outputs hΘ(x). Which of the following logical functions does it (approximately) compute? -30 ,20,20

AND
NAND (meaning “NOT AND”)
OR
XOR (exclusive OR) 
答案A 
解析: 
将-30,20,20,带入sigmoid函数,得到只有x1=1,x2=1时输出为g(10)=1,即表示逻辑AND.
 machine learning week04 exercises_第3张图片
3.Consider the neural network given below. Which of the following equations correctly computes the activation a(3)1? Note: g(z) is the sigmoid activation function. 
答案:A

machine learning week04 exercises_第4张图片

4.You have the following neural network:You’d like to compute the activations of the hidden layer a(2)∈R3. One way to do so is the following Octave code:You want to have a vectorized implementation of this (i.e., one that does not use for loops). Which of the following implementations correctly compute a(2)? Check all that apply

a2 = sigmoid (Theta1 * x);
a2 = sigmoid (x * Theta1);
a2 = sigmoid (Theta2 * x);
z = sigmoid(x); a2 = Theta1 * z; 
答案:A 
解析:(Theta1是个3×的矩阵,x是个列向量)

machine learning week04 exercises_第5张图片
答案:A
--------------------- 
原文:https://blog.csdn.net/yyxyuxueYang/article/details/81563663 
 

你可能感兴趣的:(machine learning week04 exercises)