   )
            new_momentum = self.max_momentum - current_percentage * (
                self.max_momentum - self.min_momentum
            )
        else:
            current_percentage = iterations / float(self.step_size)
            new_momentum = self.max_momentum - current_percentage * (
                self.max_momentum - self.min_momentum
            )
        K.set_value(self.model.optimizer.beta_1, new_momentum)
        self.history.setdefault(&#34;momentum&#34;, []).append(
            K.get_valu