From 50b3dc2920b076eac4cb5e726a17bd588be300fa Mon Sep 17 00:00:00 2001 From: Olivier Dulcy Date: Tue, 6 Feb 2024 13:35:21 +0100 Subject: [PATCH] exclude l1_loss in db model --- doctr/models/detection/differentiable_binarization/pytorch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doctr/models/detection/differentiable_binarization/pytorch.py b/doctr/models/detection/differentiable_binarization/pytorch.py index e3022f0a1b..43abd37031 100644 --- a/doctr/models/detection/differentiable_binarization/pytorch.py +++ b/doctr/models/detection/differentiable_binarization/pytorch.py @@ -282,7 +282,8 @@ def compute_loss( if torch.any(thresh_mask): l1_loss = (torch.abs(thresh_map - thresh_target) * thresh_mask).sum() / (thresh_mask.sum() + eps) - return l1_loss + focal_scale * focal_loss + dice_loss + # return l1_loss + focal_scale * focal_loss + dice_loss + return focal_scale * focal_loss + dice_loss def _dbnet(