yjh0410 1 an în urmă
părinte
comite
95076f0797
3 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 1 0
      odlab/config/fcos_config.py
  2. 1 0
      odlab/config/yolof_config.py
  3. 1 1
      odlab/train.py

+ 1 - 0
odlab/config/fcos_config.py

@@ -81,6 +81,7 @@ class FcosBaseConfig(object):
         # --------- Train epoch ---------
         self.max_epoch = 12        # 1x
         self.lr_epoch  = [8, 11]   # 1x
+        self.eval_epoch = 2
 
         # --------- Data process ---------
         ## input size

+ 1 - 0
odlab/config/yolof_config.py

@@ -83,6 +83,7 @@ class YolofBaseConfig(object):
         # --------- Train epoch ---------
         self.max_epoch = 12        # 1x
         self.lr_epoch  = [8, 11]   # 1x
+        self.eval_epoch = 2
 
         # --------- Data process ---------
         ## input size

+ 1 - 1
odlab/train.py

@@ -189,7 +189,7 @@ def main():
         if distributed_utils.is_main_process():
             model_eval = model_without_ddp
             to_save = False
-            if (epoch % args.eval_epoch) == 0 or (epoch == cfg.max_epoch - 1):
+            if (epoch % cfg.eval_epoch) == 0 or (epoch == cfg.max_epoch - 1):
                 if evaluator is None:
                     to_save = True
                 else: