I am working on creating a functional scorer for my data. I wanted to get some clarification on a few things.
- I create the scorer before I train my model, correct? The scorer will aid in the training process as a part of the loss function (ctc_decoder)? I am fine with using the
generate_lm.pyscript to do this. I noticed that in DeepSpeech 0.7.4 the
generate_package.pyhas moved to a .cpp file but the documentation doesn’t reflect this. To get around this I have just cloned the repo with the 0.7.3 branch to get back the old
generate_package.pyfunctionality. I am able to execute this without problem.
It would be nice to see some documentation on using the cpp version if this is the route that DeepSpeech is going for the scorer.
- The documentation on the lm_optimizer.py is a bit sparse. It seems to share the same flags as with DeepSpeech.py . From what I understand, I generate the .scorer file above. then use something like:
python lm_optimizer.py --test_files /path/to/dev.csv --scorer_path /scorer-generated above.scorer
Just to clarify I should do this all before I start training my model, correct? The scorer optimization should also be done on my dev.csv files, not my test files as to not unbias the results, right?
After completing this, I should re-make my .scorer file with the suggested alpha and beta provided.
- I was performing the lm_optimizer as above and it seemed to be working but I am getting the good ol swig memory leak error:
I’m not sure if this is a big deal as it doesn’t halt execution, I just want to clarify no issues are present. The scorer ran for a single epoch, gave some output, then continued running on another “test epoch”. I guess I am a bit confused on what this scorer is doing since it isn’t a network, how is it “training” on the data?
- Ideally after optimizing the .scorer, I should be good to go with training and point to this new scorer when I run