Closed amrmalkhatib closed 6 years ago
Python stops when a recursion reaches a specific number of levels. The maximum depth can be configured. It was increased because the default limit was too small for Theano with deep networks. Seems like the lattice decoder can also reach this limit. Try further increasing the maximum recursion depth here:
https://github.com/senarvi/theanolm/blob/master/bin/theanolm#L87
Thank you
Can you say what value you found working, or create a pull request?
I've increased the value to 3M, but it didn't solve the problem so I skipped the file.
Increasing it enough would probably make the problem disappear, but maybe it's better to prune the lattices to limit their size. It might also be possible to avoid the recursion in _move_words_to_links().
I got this error for the first time with specific file
File "/home/sh/.local/lib/python3.5/site-packages/theanolm/scoring/slflattice.py", line 143, in init self._move_words_to_links() File "/home/sh/.local/lib/python3.5/site-packages/theanolm/scoring/slflattice.py", line 282, in _move_words_to_links visit_link(link) File "/home/sh/.local/lib/python3.5/site-packages/theanolm/scoring/slflattice.py", line 279, in visit_link visit_link(next_link) File "/home/sh/.local/lib/python3.5/site-packages/theanolm/scoring/slflattice.py", line 279, in visit_link visit_link(next_link) . . . File "/home/sh/.local/lib/python3.5/site-packages/theanolm/scoring/slflattice.py", line 279, in visit_link visit_link(next_link) RecursionError: maximum recursion depth exceeded