def METHOD_NAME(self, x, grads):
    x = x.clone().detach().requires_grad_(True)
    output = self.model_classifier(x)
    output.backward(gradient=grads)
    x_grad = x.grad
    self.optimizer_classifier.step()
    self.optimizer_classifier.zero_grad()
    return x_grad