I am getting error while evaluating the model. Please tell me if can find solution for this

I replaced out=self(inputs) with out=self(inputs).reshape(-1).
Link To my notebook : niveditha-e0119019/02-insurance-linear-regression - Jovian

Your targets are incorrect. It should contain examples of single-value tensors (the outputs you want to achieve).

Now it’s just a tensor of 1271 values.

Hints:

  • Your output is a single value,
  • You have 1271 examples.

Got it. :+1: Thank you!