qpth icon indicating copy to clipboard operation
qpth copied to clipboard

Trivial problem returns NaN

Open bemilio opened this issue 2 years ago • 0 comments

Running the following trivial QP problem returns NaN:

import torch
from qpth.qp import QPFunction

Q = torch.tensor([[[1.]]]) 
q = torch.tensor([[1.]])
A_eq = torch.tensor([[[0.]]])
A_ineq = torch.tensor([[[0.]]])
b_ineq = torch.tensor([[0.]])
b_eq = torch.tensor([[0.]])
QPFunction(verbose=True)(Q, q, A_ineq, b_ineq, A_eq, b_eq)

Output:

iter: 1, pri_resid: nan, dual_resid: nan, mu: nan
iter: 2, pri_resid: nan, dual_resid: nan, mu: nan
iter: 3, pri_resid: nan, dual_resid: nan, mu: nan
tensor([[nan]])

bemilio avatar Jun 28 '22 13:06 bemilio