Docsity

Neural Network Homework: One-Hidden Layer with Sigmoid Activation - Prof. Amauri Antonio A, Assignments of Electrical and Electronics Engineering

Partial preview of the text

Download Neural Network Homework: One-Hidden Layer with Sigmoid Activation - Prof. Amauri Antonio A and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EEL-5840 Homework Fall 2008 Dr. Arroyo

Partial Solution to Homework Set

a. Yes, No, Yes, Yes b. #4 because the line separating the two classes cannot be constrained to go through the origin c., d. none

Problem 2 Consider a one-hidden layer feedforward neural network, fully connected between layers, with 2 inputs, 2 hidden units in the first layer, and 1 output. Assume sigmoidal activation functions.

a. How many total independent weights are contained in this neural network? Show Work! No Work, No Credit.

Answer: 9 independent weights. Justification: output given by z={w 7 +w 8 (w 1 +w 2 x 1 +w 3 x 2 )+w 9 (w 4 +w 5 x 1 +w 6 x 2 )}

b. Without any local variable s, how many additions, multiplications, and function evaluations (,') are required to compute the output of the neural network in terms of the inputs and the weights of the neural network? Show Work! No Work, No Credit.

Justification: z={w 7 +w 8 (w 1 +w 2 x 1 +w 3 x 2 )+w 9 (w 4 +w 5 x 1 +w 6 x 2 )} for a total of 6 "+"; 6 "*"; 3 (.) evaluations Each  (.) requires 1 addition, 1 division, and 1 exp evaluation.

Additions:_____6______ Multiplications:_____6______ Function Evaluations:_____3_____

c. Using the backpropagation algorithm, how much total computation is required [additions, multiplications and function evaluations (,')] to compute the error derivatives with respect to all the weights in the neural network, given a single training pattern <x 1 ,x 2 ,y>and the error measure E=(y-z) 2? Show Work! No Work, No Credit.

Forward Pass: Fwd Pass: z={Net 3 ); Net 3 =w 7 +w 8 h 1 +w 9 h2; h (^) 1={Net 1 ); Net 1 =(w 1 +w 2 x 1 +w 3 x 2 ); h (^) 2={Net 2 ); Net2=(w 4 +w 5 x 1 +w 6 x 2 ) Additions:_____6______ Multiplications:_____6______ Function Evaluations:_____3_____

Backward Pass: Backward Pass:  3 =(z-y)'(Net 3 ) A: 1 M: 1 f : 1  2 = 3 w 9 '(Net 2 ) A: M: 2 f : 1  1 = 3 w 8 '(Net 1 ) A: M: 2 f : 1 E/w 9 = 3 h 2 A: M: 1 f : E/w 8 = 3 h 1 A: M: 1 f : E/w 7 = 3 A: M: f : E/w 6 = 2 x 2 A: M: 1 f : E/w 5 = 2 x 1 A: M: 1 f : E/w 4 = 2 A: M: f : E/w 3 = 1 x 1 A: M: 1 f : E/w 2 = 1 x 2 A: M: 1 f : E/w 1 = 1 A: M: f :