CS767A1 Advanced ML&NNs Assignment 02

Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due

CS767A1 Advanced ML&NNs Assignment 02

Problem 1. Create a computational graph for the following expression:

 


 


Calculate the forward values of all the nodes and function  starting with. In the process of calculating every node and every intermediate value, record all partial derivatives of every intermediate value with respect to its inputs. Finally, determine the partial derivatives of   with respect to x, y, and z. Please, present your results as a simple graph. You can draw your graph by any means you find convenient, including by hand. Please place forward values above the lines representing propagation of values and backpropagation values (derivatives) below the lines. List clearly the final values of partial derivatives of function

 with respect to x, y, and z. Do all calculation with pan and paper.


(25%)

Problem 2. Find partial derivatives of function as defined in the first problem, with respect to x, y and z by using . Compare those values with the ones obtained in Problem 1.

(25%)

Problem 3. Please demonstrate that the binary classification example as presented in the lecture notes works as advertised. Please change the color of the upper set of events to green and the lower set of events to red. Instead of the read decision boundary draw a dashed blacked line. (15%)

Problem 4. Please create a synthetic set of 200 data points. Let the independent variable x has a range [0, 10]. Create dependent variable y by starting with a straight line  Subsequently, add normal Gaussian noise of standard deviation equal to 0.2. Let us “solve” the regression problem. We want to find a straight line which has the minimal mean square error from the points in the data set. Formulate the problem as a training loop which adjusts its parameters by the gradient descend method and finds parameters of the best straight line. Please rely on tf.GradientTape() for calculations of your gradients. Please plot your synthetic data points and the best fit line on the same plot.

(35%)

Problem 5. Please go through every step of attached notebook: Lab02_GradTapeBackProp.ipynb. Submit this notebook with all cells ran. Please provide HTML image of this notebook. (25%)

When submitting Jupyter ipynb files, please submit an HTML image of that file as well. Please zip two notebook files, two HTML files and any other artifacts in one archive named CS767A1_YourLastName_FirstName.zip. Make sure that your Jupyter notebooks contains description of all the steps you have taken. Please, present all intermediate and the results.

If your notebook(s) contain(s) excessively long outputs, please copy a meaningful and illustrative number of initial and/or final lines and paste those in a markdown (comment) cell. Then, delete the long output(s).

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注