pytorch-semseg icon indicating copy to clipboard operation
pytorch-semseg copied to clipboard

PolynomialLR always return base_lr

Open zhyx12 opened this issue 6 years ago • 1 comments

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

zhyx12 avatar Oct 30 '18 08:10 zhyx12

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:

muaz-git avatar Jan 08 '19 14:01 muaz-git