def update_parameters(self, model):

        if model not in self.states:
            params, grads = model.parameters()
            # TODO: Not only scalar
            hyperparams = {name: _T.scalar(name) for name in self.hyperparams}
            updates = self.get_updates(params, grads, **hyperparams)
            self.states[model] = _th.function(
                inputs=list(hyperparams.values()),
                updates=updates
            )

        self.states[model](**self.hyperparams)
dataset/ETHPy150Open VisualComputingInstitute/Beacon8/beacon8/optimizers/Optimizer.py/Optimizer.update_parameters/original