Преглед на файлове

修复step计算错误bug

lstrlq преди 6 месеца
родител
ревизия
c110db793d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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)