From 89f4bb6abf4263621ac6356fb8bf923243bc3b3c Mon Sep 17 00:00:00 2001 From: manonBlanco <blanco@teklia.com> Date: Wed, 17 May 2023 16:37:18 +0200 Subject: [PATCH] Remove coverage_vector from training.py --- dan/manager/training.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dan/manager/training.py b/dan/manager/training.py index df33eda3..042c53a7 100644 --- a/dan/manager/training.py +++ b/dan/manager/training.py @@ -1247,10 +1247,6 @@ class Manager(OCRManager): else: features = self.models["encoder"](x) features_size = features.size() - coverage_vector = torch.zeros( - (features.size(0), 1, features.size(2), features.size(3)), - device=self.device, - ) pos_features = self.models["decoder"].features_updater.get_pos_features( features ) @@ -1279,7 +1275,6 @@ class Manager(OCRManager): confidence_scores.append( torch.max(torch.softmax(pred[:, :], dim=1), dim=1).values ) - coverage_vector = torch.clamp(coverage_vector + weights, 0, 1) predicted_tokens = torch.cat( [ predicted_tokens, -- GitLab