Question: Question 3 . XOR Problem In this question, we'll train a neural network using backpropagation by hand. Don't worry, we will only train the network
Question XOR Problem
In this question, we'll train a neural network using backpropagation by hand. Don't worry, we will only train the network for a single iteration.
Our neural network will have two input features and and two hidden units and The hidden units and will use the ReLU activation, and for final prediction we will use the sigmoid activation to obtain a prediction between and
Our training example will look like this:
Part a
Our initial weights and biases will look like this:
Compute the forward pass for each of the four examples. That is for each compute and the prediction Use the notation and to denote the preactivations values of the hidden states, so that relu and relu Use to represent the logit of the prediction, so that
You may also use the vector representations but always start with the scalar representations first.
Part b
Suppose that we are using a minibatch size of and that we are using to estimate the cost function. Use backpropagation to compute the below terms. For the vector and matrix derivatives, always start with the scalar derivatives of its elements before putting them together in vector or matrix.
Update Feb : Please use the crossentropy loss.
Part c
Assuming a learning rate of perform one iteration of weight update based on the values you obtained from part b
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
