Save the file ptr such that we can avoid repeatedly open/close files in training. This is critical for dataloader perf.
Modularize the ctc_crf module. Now it works fully like a python module. Maybe we can further rewrite the crf init/release as a context manager in the future, with which the codes could be like
...
with CRF('den_lm.fst', gpu):
manager.run(...)
...
Two main changes:
ctc_crf
module. Now it works fully like a python module. Maybe we can further rewrite the crf init/release as a context manager in the future, with which the codes could be likeAll changes have been tested on WSJ.