Update.
authorFrançois Fleuret <francois@fleuret.org>
Tue, 3 Sep 2024 07:04:59 +0000 (09:04 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Tue, 3 Sep 2024 07:04:59 +0000 (09:04 +0200)
main.py

diff --git a/main.py b/main.py
index 9b2282f..fb0b4df 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -1138,7 +1138,7 @@ def targets_and_prediction(model, input, mask_generate, prompt_noise=0.0):
 
     if prompt_noise > 0:
         mask_prompt_noise = (
-            torch.rand(input.size(), device=input.device()) <= prompt_noise
+            torch.rand(input.size(), device=input.device) <= prompt_noise
         ).long()
         noise = torch.randint(
             quiz_machine.problem.nb_colors, input.size(), device=input.device