lmjohns3 / theanets

Neural network toolkit for Python
http://theanets.rtfd.org
MIT License
328 stars 73 forks source link

Merge of layerwise work and changes to cascaded trainer #1

Closed kastnerkyle closed 11 years ago

kastnerkyle commented 11 years ago

Rebase+squash seems to have left the wrong commit author...

kastnerkyle commented 11 years ago

I just thought of something - how does the command-line stuff get parsed? Will it parse ['layerwise','sgd'] as a list or just as a string with brackets in it?

lmjohns3 commented 11 years ago

For the optimize=['layerwise', 'sgd'] question, the list literal in the code should work fine. The string parsing happens only when the command-line arguments are first processed.

kastnerkyle commented 11 years ago

I had a lot of trouble with the rebase, and went with a merge instead (per the link you sent me, this should work too). Let me know if it is OK now, or if I should try to tackle the rebase again.

kastnerkyle commented 11 years ago

Agreed on the programmatic option for trainer_specific_args - I would argue that once the commandline args get that nasty, it is preferable (and simpler) to just write a python script.

You are definitely right on the copy vs. reference thing! This code worked because the trainers were both modifying the same kwargs key, effectively invalidating previous changes. I think it would have broken very painfully if two trainers modified different keys... which was the reason I tried to revert back to orig_kwargs in the first place. Good catch, I think this will fix that problem. I also added better logging in the Cascaded trainer to make it clearer what arguments are being used.

kastnerkyle commented 11 years ago

Closing pull request, in favor of several "bite sized" PRs