Urgent help needed, element 0 of tensors does not require grad and does not have a grad_fn for multiple layer

Here are the code screenshots, I am trying the boston housing problem by using three layers but this gives me error in the loss.backward() despite setting the requires_grad = True
Kindly help me understand the issue.

Just throw out torch.no_grad from model() function.

Why is it even there?