CambridgeCIA / LION

Learned Iterative Optimization Networks
GNU General Public License v3.0
20 stars 15 forks source link

loading function bad! #98

Open AnderBiguri opened 6 months ago

AnderBiguri commented 6 months ago

Currently the only way to load a model now is via initialization, i.e. model = LPD.load(file). If you do model = LPD() then model.load(file) this does not load the file.

Originally this was by-design, as model parameters required to initialize the model are saved with it, so this avoids loading a model in a wrongly initialized object, and avoids needing to know a priori the model initialization settings (e.g. number of iters).

However, this comes with 2 serious problems

1- the instance method does not exist, so it silently does not load anything. Bad. people assume that model.load(file) is loading it, when its not. 2- A LIONmodel inside another LIONmodel will never be initialized. This is a critical failure.