    def on_backward(
        self,
        trainer: "GradientDescentTrainer",
        batch_outputs: Dict[str, torch.Tensor],
        backward_called: bool,
        **kwargs,
    ) -> bool:
        """
        This callback hook performs backpropagation and allows for gradient manipulation.
        `backward_called` indicates if `loss.backward` has been called prior to this callback.
        `on_backward` should return `True` if and only if `loss.backward` is called in its body.
        """
        return False
This callback hook performs backpropagation and allows for gradient manipulation.
`backward_called` indicates if `loss.backward` has been called prior to this callback.
`on_backward` should return `True` if and only if `loss.backward` is called in its body.
allennlp/training/callbacks/callback.py