Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 2a29fc9

Browse files
committed
Buffer chunks of images proportionally to size.
1 parent da354f3 commit 2a29fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enhance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def add_to_buffer(self, f):
188188
if args.train_noise:
189189
seed += scipy.random.normal(scale=args.train_noise, size=(seed.shape[0], seed.shape[1], 1)) ** 4.0
190190

191-
for _ in range(args.buffer_similar):
191+
for _ in range(seed.shape[0] * seed.shape[1] // self.seed_shape * 2):
192192
h = random.randint(0, seed.shape[0] - self.seed_shape)
193193
w = random.randint(0, seed.shape[1] - self.seed_shape)
194194
seed_chunk = seed[h:h+self.seed_shape, w:w+self.seed_shape]

0 commit comments

Comments
 (0)