keras/src/backend/torch/layer.py/TorchLayer/_post_track_variable
class TorchLayer:    def _post_track_variable(self, variable):
        if hasattr(self, "torch_params"):
            if variable.path not in self.torch_params:
                self.torch_params[variable.path] = variable.value