I trained a multilingual OCR model using using CTC loss function. As I used JTL to train different languages, the output size is 146 (including blank). I tried to use ctcdecoder.CTCBeamDecoder to decode the network output but instantiating this class with 146 labels takes huge amount of ram (and time also).
Bellow is the table of allocated memory wrt label size:
label size
memory used (in GB)
40
.73
80
1.2
120
2.29
160
6.85
As the table shows, memory usage grow faster than linear order, thus the decoder is not applicable with models contains plenty of outputs! Is there any plan for supporting improving memory usage of decoder? Or is there any thing I could do to alleviate the issue?
Hi
I trained a multilingual OCR model using using CTC loss function. As I used JTL to train different languages, the output size is 146 (including blank). I tried to use
ctcdecoder.CTCBeamDecoder
to decode the network output but instantiating this class with 146 labels takes huge amount of ram (and time also). Bellow is the table of allocated memory wrt label size:As the table shows, memory usage grow faster than linear order, thus the decoder is not applicable with models contains plenty of outputs! Is there any plan for supporting improving memory usage of decoder? Or is there any thing I could do to alleviate the issue?
Best regards.