kjunelee / MetaOptNet

Meta-Learning with Differentiable Convex Optimization (CVPR 2019 Oral)
Apache License 2.0
517 stars 95 forks source link

there is error when the network is Resnet and the head is SVM. #11

Closed suengah closed 4 years ago

suengah commented 5 years ago

when the code is perfomed by the head function which is MetaOptNetHead_SVM_CS. It calls QPFunction. When the function is called. The error comes up TypeError : btrisolve() takes 3 positional arguments but 4 were given. The other options same as the default options except network, head.

kjunelee commented 5 years ago

This is the same issue as #10. I remember I had the same issue in the past, but I think it was resolved by upgrading the packages. Could you try the following version of packages? qpth 0.0.13 PyTorch 1.0.1.post2

PacteraKun commented 4 years ago

I have the similar issue. I'm using the following version of packages. qpth 0.0.13 PyTorch 1.1.0

kjunelee commented 4 years ago

I think it is due to incompatibility between latest PyTorch and qpth. Here is how I fixed the problem.

  1. Uninstall qpth package installed from pip.
  2. Clone from https://github.com/locuslab/qpth and install it. Note that the version from pip is actually not up-to-date.
git clone https://github.com/locuslab/qpth.git
cd qpth
python setup.py install
PacteraKun commented 4 years ago

Thank you for your reply. I will try this.