keras/src/backend/torch/layer.py/TorchLayer/_post_untrack_variable
class TorchLayer:    def _post_untrack_variable(self, variable):
        if hasattr(self, "torch_params"):
            self.torch_params.pop(variable.path)