浏览代码

修复val损失为0的bug

RenLiqiang 5 月之前
父节点
当前提交
d4f0a5ce77
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      models/line_detect/trainer.py

+ 1 - 1
models/line_detect/trainer.py

@@ -150,7 +150,7 @@ class Trainer(BaseTrainer):
     def writer_predict_result(self, img, result, epoch):
     def writer_predict_result(self, img, result, epoch):
         img = img.cpu().detach()
         img = img.cpu().detach()
         im = img.permute(1, 2, 0)  # [512, 512, 3]
         im = img.permute(1, 2, 0)  # [512, 512, 3]
-        self.writer.add_image("ori", im, epoch, dataformats="HWC")
+        self.writer.add_image("z-ori", im, epoch, dataformats="HWC")
 
 
         boxed_image = draw_bounding_boxes((img * 255).to(torch.uint8), result["boxes"],
         boxed_image = draw_bounding_boxes((img * 255).to(torch.uint8), result["boxes"],
                                           colors="yellow", width=1)
                                           colors="yellow", width=1)