Modified from gluon tutorial https://gluon.mxnet.io/chapter02_supervised-learning/linear-regression-scratch.html.
A sigmoid function of linear function with weights w and b is used to get a more complicated loss function.
We can see how weights approach the real points with training going.