Support for retain_graph=True
Is your feature request related to a problem? Please describe.
Some models require retain_graph=True, but it's not possible to set it in the .backward() call inside of Trainer.__run_training_batch(...)
Describe the solution you'd like
Add train_graph member function the LightningModule have the trainer read this option and then pass it into the .backward() call.
Describe alternatives you've considered
Driving a version of Trainer to support retain_graph=True is tough because __run_training_batch and other functions are name-mangled.