Getting infinite loss with my simple Linear Regression model

hello below is my first linear regression model with PyTorch.
if I increase num_data to 1000, the loss become infinite…
I don’t know why
any help would be appreciated so much!!

My Colab Link :

Solved it by changing learning_rate. but I don’t know what’s going on :frowning: