Question: Problem # 1 . Backpropagation. 1 ( a ) For this problem, we will follow the tutorial on autograd given at: PyTorch autograd. We define
Problem # Backpropagation.
a For this problem, we will follow the tutorial on autograd given at: PyTorch
autograd.
We define neural networks using a l that takes a vector and outputs a
scalar as in traditional optimization methods of studying f x However, neural
networks use function composition to propagate the inputs to the outputs. In
the autograd example, the notation is as follows:
l is the output scalar function eg mean squared error
y denotes the top output layers of the neural network..
x denotes the input to the neural network.
In order to train Neuralnetworks using the loss function, we need to compute
gradients of l with respect to all of the variables. In the simplest form, we
use functional composition to express l for a specific input: lyx When
designing neuralnetworks, we can assume that the derivatives of each level are
available to us This means that we assume that the following derivatives are
given to us:
l
yi
yi
xj
for i m j n
We then have to determine all other derivatives. To determine the dependence
of the lossfunction based on the input, we use:
l
x
l
xn
y
x
ym
x
y
xn
ym
xn
l
y
l
ym
Multiply out the matrix by the vector to derive an expression for lxi How
many terms do you have?
b Let us introduce one more layer. Suppose that the loss is given by lygx
Apply a recursively to derive an expression for lxi for this case. Assume
that g outputs a p dimensional vector that is input to y Assume that all other
dimensions remain as given in a You will need to clearly label all matrix
dimensions in your derivation.
c Repeat b for lyggx Assume that the output of g is p dimen
sional and the output for g is p dimensional. Make sure to clearly indicate all
the matrix dimensions.
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
