manuel-delverme / constrained_optimization

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Unnecessary re-evaluation of closure #4

Closed juan43ramirez closed 3 years ago

juan43ramirez commented 3 years ago

https://github.com/manuel-delverme/constrained_optimization/blob/6469787ea46ec45b313e45c79213673eaed995ea/src/torch_constrained/constrained_optimizer.py#L63-L65

The closure, as well as the Lagrangian, should only be evaluated if self.alternating is True. This slightly slows down execution.

manuel-delverme commented 3 years ago

Thank you