IDSIA / brainstorm

Fast, flexible and fun neural networks.
Other
1.3k stars 152 forks source link

Make Hooks more independent #43

Closed flukeskywalker closed 8 years ago

flukeskywalker commented 8 years ago

If we remove monitor_kwargs from the Trainer, and start() from the hooks, it will become very simple to create and call a standalone hook without using a trainer. This seems to be useful/required.

Some alterations to the call signature for hooks might needed to make things less awkward.

Any objections to this?

Qwlouse commented 8 years ago

Then we would have to pass the data-iterators to the hooks during creation. The reason we did not do this, is that data-iterators are not-describable. This approach would thus make hooks and the trainer non-describable.

I agree that it would simplify reusing the hooks and also the general API, so it might be worth reconsidering this design choice. But we should carefully consider the implications.

Qwlouse commented 8 years ago

We decided not to do this and keep the current system of using string references to data iterators. But I did rename monitor_kwargs to named_data_iters to make its intention more clear.

Also there is now the brainstorm.tools.evaluate function and the trainer.evaluate method to easily evaluate a network.