I changed it to self.hidden3 = Linear(8, 2), and it give this errors:
/.local/lib/python3.8/site-packages/torch/nn/modules/loss.py:520: UserWarning: Using a target size (torch.Size([32, 1])) that is different to the input size (torch.Size([32, 2])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
/.local/lib/python3.8/site-packages/torch/nn/modules/loss.py:520: UserWarning: Using a target size (torch.Size([19, 1])) that is different to the input size (torch.Size([19, 2])). This will likely lead to incorrect results due to broadcasting. Please ensure they have the same size.
return F.mse_loss(input, target, reduction=self.reduction)
170:mse = evaluate_model(test_dl, model)
145:mse = mean_squared_error(actuals, predictions)
Traceback (most recent call last):
File “Temp.py”, line 170, in 
mse = evaluate_model(test_dl, model)
File “Temp.py”, line 145, in evaluate_model
mse = mean_squared_error(actuals, predictions)
File “/.local/lib/python3.8/site-packages/sklearn/metrics/_regression.py”, line 423, in mean_squared_error
y_type, y_true, y_pred, multioutput = _check_reg_targets(
File “/.local/lib/python3.8/site-packages/sklearn/metrics/_regression.py”, line 100, in _check_reg_targets
raise ValueError(
ValueError: y_true and y_pred have different number of output (1!=2)