optnet icon indicating copy to clipboard operation
optnet copied to clipboard

RuntimeError: invalid argument 3: dimensions of A and b must be equal

Open Blanchedingding opened this issue 7 years ago • 1 comments

When I used the optnet to run all the three experiments, I got the following error:

` RuntimeError: invalid argument 3: dimensions of A and b must be equal at /pytorch/torch/lib/TH/generic/THTensorLapack.c:1036

/usr/local/lib/python3.5/dist-packages/qpth/solvers/pdipm/batch.py(357)solve_kkt() 355 h = (invQ_rx.unsqueeze(1).bmm(G.transpose(1, 2)) + rs / d - rz).squeeze(1) 356 --> 357 w = -(h.btrisolve(*S_LU)) 358 359 g1 = -rx - w[:, neq:].unsqueeze(1).bmm(G) `

Did I miss something or do something wrong with the qpth or other environment? I can run the fc and lenet network in the classification experiment. Since I don't have a CUDA, I uncomment all the “.cuda()” in the models.py

Blanchedingding avatar Jan 10 '18 13:01 Blanchedingding

Same problem. I solve this by downgrade pytorch to 0.12, it seems like optnet now doesn't compatible with pytorch 0.2 and 0.3.

weizheliu avatar Jan 21 '18 20:01 weizheliu