Open chenyang-tao opened 7 years ago
@chenyang-tao Sorry for the delay. Can you add the complete code snippet? like the definition of init_params
and grad_J
. I've made a similar example and run for many times. The obsolete copy thing doesn't happen in my case
Hey developers, here is a possible memory leakage issue that took me a lot of pain to track down...
If I run the following code a few times:
the outputs would be something like:
So obviously the '-=' operator is being applied to an obsolete copy of the parameters, that should not be in the memory as I have already overwritten it with the re-initialization op. And there are a few times I noticed the Params are simply overwritten by the grad_J with the '-=' op.
However the a very simple snippet of similar code works as expected in the same python session.
The version I am using is minpy (0.3.0).