From 3e335fbcb596336e8d7adb9208e27b4f60200383 Mon Sep 17 00:00:00 2001 From: Laurent Fainsin Date: Thu, 30 Jun 2022 15:54:36 +0200 Subject: [PATCH] fix: bad loop condition Former-commit-id: 71677d5f1a37b742985f4335c6dc1c476a82ba48 [formerly df8e6e36e785f07970d47be9183bbab5ac386e01] Former-commit-id: 1162f7d0a8eac822fbd2e3f38edd2f2c8a81124f --- src/utils/paste.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/paste.py b/src/utils/paste.py index 2db7f01..8d5f904 100644 --- a/src/utils/paste.py +++ b/src/utils/paste.py @@ -119,7 +119,7 @@ class RandomPaste(A.DualTransform): # generate some positions positions = [] NB = rd.randint(1, self.nb) - while len(positions) <= NB: + while len(positions) < NB: x = rd.randint(0, target_shape[0] - paste_shape[0]) y = rd.randint(0, target_shape[1] - paste_shape[1])