ions + 1) % (self.step_size * 2)
    if iterations / self.step_size &gt; 1:
        self.overhump = True
    else:
        self.overhump = False
    if not prev_overhump and self.overhump:
        self.base_lr = self.max_lr / 1000
    elif prev_overhump and not self.overhump:
        self.base_lr = self.orig_base_lr

    # set momentum
    if self.cycle_momentum:
        if self.overhump:
            current_percentage = 1.0 - (
                (iterations - self.step_size) / float(self.step_size)
         