Question: Using PyTorch without helper functions ( without using torch.nn or torch.optim ) , calculate the values of a & b that best fit the model

Using PyTorch without helper functions (without using torch.nn or torch.optim), calculate
the values of a&b that best fit the model f(x) using the gradient descent algorithms with
the following:
f(x)=e-ax+2ax+b
x=[-2,-1.9,-1.8,-1.7,-1.6,-1.5,-1.4,-1.3,-1.2,-1.1,
-1,-0.8,-0.7,-0.6,-0.5,-0.4,-0.3,-0.2,-0.1,0,
0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,
1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,2.0]
y0=[6.255,6.121,6.005,5.907,5.825,5.758,5.704,5.664,5.636,5.62,
5.614,5.618,5.631,5.652,5.682,5.719,5.763,5.814,5.87,5.933,
6.0,6.072,6.149,6.231,6.316,6.405,6.497,6.593,6.691,6.793,
6.897,7.003,7.112,7.223,7.335,7.45,7.566,7.684,7.804,7.924]
 Using PyTorch without helper functions (without using torch.nn or torch.optim), calculate

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 Databases Questions!