Question for regression problem with multiple variables


I am studying pytorch with video, and the instructor shows how to write code for linear regression.

And he gives a problem to find correct weights given multiple variables.

For example, y^ = w1x1 + w2+x2 + b

Could anyone give me a short code example using pytorch please?

Thank you!

This might help: .