Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started