def _finish_poison_pytorch(self):
        """
        Releases any resource and revert back unwanted change to the model.
        """
        if self.model_trainable:
            self.substitute_classifier.model.train()
        else:
            self.substitute_classifier.model.eval()

        Releases any resource and revert back unwanted change to the model.
        
art/attacks/poisoning/gradient_matching_attack.py