Question: In this homework you will implement a Multi-Layer Perceptron (MLP) for Regression. In class we went over an MLP for XOR data, which was a

In this homework you will implement a Multi-Layer Perceptron (MLP) for Regression. In class we went over an MLP for XOR data, which was a classification task. You will modify that code to make it work for regression. 2 Data The data is given below: X train = torch.tensor( [245.0, 273.0, 304.0, 331.0, 347.0, 360.0, 387.0, 438.0, 493.0, 547.0] ).view(-1,1) y train = torch.tensor( [232.3, 241.1, 257.4, 301.5, 324.6, 350.2, 362.3, 389.0, 398.2, 401.8] ) If we used a linear regression on this data, we would get the line shown in Figure 1. When you use an MLP with hidden layers and non-linear activations, you will get a non-linear fit to the data. Figure 1: Linear Regression For regression, you do not need the Softmax and Argmax in your MLP, but will rather collect a single value (meant to be the continuous output of the non-linear function you are modeling). When you write the 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!