jpuigcerver/Laia

Add command-line options registrar in classes

jpuigcerver opened this issue · 1 comments

Currently, each tool (trainer, decoder, etc) defines command-line options and passes them to the different objects that they use (batcher, distorter, trainer, etc).

This means that several options are duplicated across different tools, meaning potential inconsistencies in the description, default parameters, etc. Also, this means that each tool has to keep track of all the options in each of the classes that they use.

It would be more appropriate if the classes had two default methods: register_options(cmd) and parse_options(opts), to register to the command line parser and to parse the options read from the command line.

I'm working on this, see some examples: CTCTrainer.lua, WeightDecayRegularizer.lua, ...