diff --git a/reagent/models/linear_regression.py b/reagent/models/linear_regression.py index e672028f..b326654d 100644 --- a/reagent/models/linear_regression.py +++ b/reagent/models/linear_regression.py @@ -104,7 +104,7 @@ def _calculate_coefs(self) -> None: self.cur_sum_weight, reduce_op=ReduceOp.SUM ) - self.inv_A = torch.inverse( + self.inv_A = torch.linalg.pinv( self.A + self.l2_reg_lambda * torch.eye(