neurospin / pylearn-parsimony_history

Sparse and Structured Machine Learning in Python
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Design of DataDependent Loss function may cause memory leak #1

Closed duchesnay closed 10 years ago

duchesnay commented 11 years ago

Method "set_data" of "DataDependent" loss functions yield to keep references on X an y blocs. This may cause memory leak issues. Indeed when you call fit on a model, you expect it to store parameters but not the whole input dataset. So I suggest that the "set_data" method computes only the parameters that depend only on the data for example the Lipschitz constant. This also mean that f and grad should accept X and y as parameters.