How to switch from optimizer during training

I am getting the following error :
self.trainer.accelerated_backend.setup_optimizers(self)
AttributeError: ‘Trainer’ object has no attribute ‘accelerated_backend’