Hi community, I tested the first simple code with `xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float) ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float)`

but when I make my test with more data like here `xs = np.array([float(x) for x in range(-2, 1000)], dtype=float) ys = np.array([float(hw_function(x)) for x in xs], dtype=float)`

I have loss and predict value as nan. Can you explain why?

Which course are you attending? You posted in “General Discussions”.

“nan” means Not A Number. It means there is a defect in your code. Perhaps the defect is in your “hw_function()” code.