Manual Backward, how to get the parameters gradients at the end of the fit method

you need to set automatic_optimization=False

class LitModule(LightningModule):
    def __init__(self, ...):
        ....
        self.automatic_optimization = False