kjunelee / MetaOptNet

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

Some questions about MetaOptNetHead_Ridge #39

Closed WHQ1111 closed 4 years ago

WHQ1111 commented 4 years ago

I have read you code , and I think there may be some wrong about the function 'MetaOptNetHead_Ridge' in classification_heads.py. I think it should be

                    e = -1.0 * support_labels_one_hot

not

                   e = -2.0 * support_labels_one_hot

And the equation (11) should be minimize not maximize. Am I right?

kjunelee commented 4 years ago

This is a great question. I had the same confusion when I worked on this project. If you try the one with -1.0, you will empirically observe that it performs worse than the one with -2.0.

The implementation is correct, but there is a typo in the equation (11) of the paper. I apologize for the confusion. The correct equation should look like this: image Please refer to the derivation of dual ridge regression e.g. in "Ridge Regression Learning Algorithm in Dual Variables" by Saunders et al. (1998).

WHQ1111 commented 4 years ago

Thank you very much. I get it.