gyrojeff commited on
Commit
ef4052d
1 Parent(s): 0f071a5

fix: checkpoint loading bug

Browse files
Files changed (1) hide show
  1. detector/model.py +1 -1
detector/model.py CHANGED
@@ -298,7 +298,7 @@ class FontDetector(ptl.LightningModule):
298
  optimizer, self.num_warmup_iters, self.num_iters
299
  )
300
  print("Load epoch:", self.load_epoch)
301
- for _ in range(self.num_iters * self.load_epoch // self.num_epochs):
302
  self.scheduler.step()
303
  print("Current learning rate set to:", self.scheduler.get_last_lr())
304
  return optimizer
 
298
  optimizer, self.num_warmup_iters, self.num_iters
299
  )
300
  print("Load epoch:", self.load_epoch)
301
+ for _ in range(self.num_iters * (self.load_epoch + 1) // self.num_epochs):
302
  self.scheduler.step()
303
  print("Current learning rate set to:", self.scheduler.get_last_lr())
304
  return optimizer