Hi,
I’m implementing a version of a proximal gradient descent algorithm. For this, I wrote an optimizer which takes a prox callable as argument (e.g. a method which performs soft thresholding, clipping, or some projection/prox) ; this prox is saved as an attribute in the defaults dict.
When I try to save the optimizer’s state dict, I get a pickling error: Attribute error: can't pickle local object 'prox' .
Is there any way to get around this?
Code to reproduce this error: Google Colaboratory