def epoch_step(self, epoch: int) -> None:
    self.metrics()
    if (epoch == 0):
        velocity = (self.init_lr * np.ones(len(self.velocity)))
        self.KG = self.metrics.KG(epoch)
    else:
        KG = self.metrics.KG(epoch)
        velocity = (KG - self.KG)
        self.KG = KG
        for idx in self.not_ready:
            if np.isclose(KG[idx], 0.0):
                velocity[idx] = (self.init_lr - (self.beta * self.velocity[idx]))
            else:
                self.not_ready.remove(idx)
    if (self.step_size is not None):
        if (((epoch % self.step_size) == 0) and (epoch > 0)):
            self.lr_vector *= self.gamma
            self.zeta *= self.gamma
    self.velocity = np.maximum(((self.beta * self.velocity) + (self.zeta * velocity)), 0.0)
    count = 0
    for i in range(len(self.metrics.params)):
        if (i in self.metrics.mask):
            self.lr_vector[i] = self.lr_vector[(i - (1 if (i > 0) else 0))]
        else:
            self.lr_vector[i] = self.velocity[count]
            count += 1
def epoch_step(self, epoch: int) -> None:
    self.metrics()
    if (epoch == 0):
        velocity = (self.init_lr * np.ones(len(self.velocity)))
        self.KG = self.metrics.KG(epoch)
    else:
        KG = self.metrics.KG(epoch)
        velocity = (KG - self.KG)
        self.KG = KG
        for idx in self.not_ready:
            if np.isclose(KG[idx], 0.0):
                velocity[idx] = (self.init_lr - (self.beta * self.velocity[idx]))
            else:
                self.not_ready.remove(idx)
    if (self.step_size is not None):
        if (((epoch % self.step_size) == 0) and (epoch > 0)):
            self.lr_vector *= self.gamma
            self.zeta *= self.gamma
    self.velocity = np.maximum(((self.beta * self.velocity) + (self.zeta * velocity)), 0.0)
    count = 0
    for i in range(len(self.metrics.params)):
        if (i in self.metrics.mask):
            self.lr_vector[i] = self.lr_vector[(i - (1 if (i > 0) else 0))]
        else:
            self.lr_vector[i] = self.velocity[count]
            count += 1