SMART-Lab / smartlearner

SMART-Learner is a machine learning library built with researchers in mind.
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Refactor how the updates are handled #34

Closed ASalvail closed 9 years ago

ASalvail commented 9 years ago

I suggest a global updates gatherer (either a module function or a singleton class if you feel fancy) that each parts would have access to. This way, everyone would be in charge of registering its updates.

Another solution is a chain call to gather the updates. This would have to be added in the interfaces of each abstract classes (Model, Optimizer, Loss?, Tasks?).

MarcCote commented 9 years ago

By far, I prefer the latter since the first option doesn't allow multiple Theano functions (i.e. multiple updates dict). For instance, we might have a view that computes some metric and that does so using a Theano function which needs updates (probably because of a scan op somewhere in is model).

I also find it cleaner and more intuitive compare to relying on the user to know there is a singleton class he needs to register his object updates to.

ASalvail commented 9 years ago

That's actually a very convincing point. Let's do that.

On August 16, 2015 1:14:38 PM EDT, "Marc-Alexandre Côté" notifications@github.com wrote:

By far, I prefer the latter since the first option doesn't allow multiple Theano functions (i.e. multiple updates dict). For instance, we might have a view that computes some metric and that does so using a Theano function which needs updates (probably because of a scan op somewhere in is model).

I also find it cleaner and more intuitive compare to relying on the user to know there is a singleton class he needs to register his object updates to.


Reply to this email directly or view it on GitHub: https://github.com/SMART-Lab/smartlearner/issues/34#issuecomment-131584094

Sent from my Android device with K-9 Mail. Please excuse my brevity.