pytorch-semseg
pytorch-semseg copied to clipboard
PolynomialLR always return base_lr
In the implementation of get_lr() function of Polynomial LR, self.last_epoch % self.max_iter will always be true unless last_epoch > max_iter https://github.com/meetshah1995/pytorch-semseg/blob/89f4abe180528a69e32ac1217746f68dfafd0e36/ptsemseg/schedulers/schedulers.py#L26-L31
There is a logical error in this line
It should be
if self.last_epoch % self.decay_iter or self.last_epoch % self.max_iter == 0:
instead of
if self.last_epoch % self.decay_iter or self.last_epoch % self.max_iter: