From 70e99d77ce71c8eec56be1951f2637a6cae8934f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A9lodie?= <melo.boillet@gmail.com>
Date: Wed, 26 Jul 2023 08:48:32 +0200
Subject: [PATCH] Fix padding to bottom-right

---
 dan/utils.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dan/utils.py b/dan/utils.py
index 9eddb9c5..19a3088c 100644
--- a/dan/utils.py
+++ b/dan/utils.py
@@ -26,11 +26,11 @@ def pad_sequences_1D(data, padding_value):
     return padded_data
 
 
-def pad_images(data):
+def pad_images(images):
     """
-    Pad the images so that they are in the middle of the large padded image (tb-lr mode).
-    :param data: List of numpy arrays.
-    :return padded_data: A tensor containing all the padded images.
+    Pad the images so that they are at the top left of the large padded image.
+    :param images: List of images as torch tensors.
+    :return padded_images: A tensor containing all the padded images.
     """
     longest_x = max([x.shape[1] for x in data])
     longest_y = max([x.shape[2] for x in data])
@@ -46,7 +46,7 @@ def pad_images(data):
             top : padded_data.shape[2] - bottom,
             left : padded_data.shape[3] - right,
         ] = image
-    return padded_data
+    return padded_images
 
 
 def read_image(path):
-- 
GitLab