Use retain_graph True in a pytorch lightning model

hey @mamunm

the correct hook would be just backward.

Also, we have moved the discussions to GitHub Discussions. You might want to check that out instead to get a quick response. The forums will be marked read-only soon.

Thank you