Browse Source

修复step计算错误bug

lstrlq 6 months ago
parent
commit
c110db793d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      models/line_detect/trainer.py

+ 1 - 1
models/line_detect/trainer.py

@@ -287,7 +287,7 @@ class Trainer(BaseTrainer):
 
         total_loss = 0
         epoch_step = 0
-        global_step = epoch_step * len(data_loader)
+        global_step = epoch * len(data_loader)
         for imgs, targets in data_loader:
             imgs = self.move_to_device(imgs, device)
             targets = self.move_to_device(targets, device)