ML Katas

Implement a Linear Regression Model

easy (<30 mins) pytorch training linear regression basics
this month by E

Build a simple linear regression model using nn.Module. Requirements:

  • One input feature, one output.
  • Train it on synthetic data y=3x+2+ϵ.
  • Use MSELoss and SGD.

Check learned weights vs. true values.