keras/src/backend/torch/layer.py/TorchLayer/_track_variables
class TorchLayer:    def _track_variables(self):
        # set torch_params attribute will have module automatically track
        # parameters.
        self.torch_params = torch.nn.ParameterDict(
            {variable.path: variable.value for variable in self.variables}
        )