1ytic/warp-rnnt

RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed。

lfgogogo opened this issue · 1 comments

I search the error in the title,it happens when there are several losses.But in my code,there is only the RNN-t-loss,but it gives the error.
The full sentence is ''RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time.".
I tried the "retain_graph=True" parameter in loss.backward(),it failed.
So do you have some ideas about the error?