From: François Fleuret Date: Tue, 27 Aug 2024 15:01:13 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b1792fcbe9737d356e31b4aec574bad7c58fd58;p=culture.git Update. --- diff --git a/main.py b/main.py index 0ecd492..e4237d2 100755 --- a/main.py +++ b/main.py @@ -941,6 +941,7 @@ def ae_generate(model, input, mask_generate, noise_proba, nb_iterations_max=50): update = (1 - mask_to_change) * input + mask_to_change * final if update.equal(input): + log_string(f"exit after {it+1} iterations") break else: changed = changed & (update != input).max(dim=1).values