diff --git a/dan/predict/prediction.py b/dan/predict/prediction.py index 9c8de08595e772155f451b4a2e0394ed4570dffe..f288fbbfe4daba51670b3c53f51d36f390adffab 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,