From 0104171df31ba969449e5921b386434edafc28d4 Mon Sep 17 00:00:00 2001
From: manonBlanco <blanco@teklia.com>
Date: Wed, 17 May 2023 16:33:19 +0200
Subject: [PATCH] Remove coverage_vector from predict.py

---
 dan/predict/prediction.py | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/dan/predict/prediction.py b/dan/predict/prediction.py
index 9c8de085..f288fbbf 100644
--- a/dan/predict/prediction.py
+++ b/dan/predict/prediction.py
@@ -148,10 +148,6 @@ class DAN:
 
             features = self.encoder(input_tensor.float())
             features_size = features.size()
-            coverage_vector = torch.zeros(
-                (features.size(0), 1, features.size(2), features.size(3)),
-                device=self.device,
-            )
             pos_features = self.decoder.features_updater.get_pos_features(features)
             features = torch.flatten(pos_features, start_dim=2, end_dim=3).permute(
                 2, 0, 1
@@ -179,7 +175,6 @@ class DAN:
                 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