nntools
nntools copied to clipboard
unroll_scan=True can cause maximum recursion depth error
In https://github.com/craffel/lstm_benchmarks, if unroll_scan=True
is used on all layers, Python dies when computing the gradient because RuntimeError: maximum recursion depth exceeded while calling a Python object
. This shouldn't be terribly surprising; there are going to be a lot of nodes in that graph! But, it would be nice to know ahead of time as I imagine it would be confusing/frustrating to users to get this error when they think they are going to be speeding up their computations.
If I increase the maximum recursion depth, it can proceed without an error, but left overnight it still hasn't compiled any functions yet. I think it's worth adding some kind of note about it not being worth it to use unroll_scan
when the computational graph is reasonably complex.
Same issue here. Might be worthwhile to warn about this in the documentation.