From d7684bd19db8a511592dfa0700fcbf25c36dea8e Mon Sep 17 00:00:00 2001
From: Franck Galpin <franck.galpin@interdigital.com>
Date: Mon, 3 Feb 2025 15:39:37 +0100
Subject: [PATCH] correction for hop5

---
 .../training_scripts/NN_Filtering/common/training/trainer.py    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/training/training_scripts/NN_Filtering/common/training/trainer.py b/training/training_scripts/NN_Filtering/common/training/trainer.py
index 304385ddb..e72592e33 100644
--- a/training/training_scripts/NN_Filtering/common/training/trainer.py
+++ b/training/training_scripts/NN_Filtering/common/training/trainer.py
@@ -325,8 +325,8 @@ class Trainer:
         return {"lossY": lossY, "lossUV": lossUV, "lossYUV": lossYUV}
 
     def iteration(self, sample):
+        cropped_size = False
         if "dct_size" in self.config_training and self.dct_size >= 2:
-            cropped_size = False
             sample_dct = self.applyDCT2(sample)
             Ycoeff_res, UVcoeff_res = self.model(
                 {name: tensor.to(self.device) for name, tensor in sample_dct.items()}
-- 
GitLab