From 537b9b0d74ebd2f6a5225062ac32b038a1fcb7cc Mon Sep 17 00:00:00 2001
From: Stephan Hilb <stephan@ecshi.net>
Date: Wed, 4 May 2022 11:30:19 +0200
Subject: [PATCH] fix noise generation

---
 scripts/run_experiments.jl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/run_experiments.jl b/scripts/run_experiments.jl
index c9196e1..104a5e8 100644
--- a/scripts/run_experiments.jl
+++ b/scripts/run_experiments.jl
@@ -894,7 +894,7 @@ function add_noise(img; noise_sigma, noise_p)
     img_noisy = img .+ noise_sigma * randn(rng, Float64, size(img))
     for i in eachindex(img)
         if rand(rng) < noise_p
-            img_noisy[i] = rand(Bool) ? 1. : 0.
+            img_noisy[i] = rand(rng, Bool) ? 1. : 0.
         end
     end
 
-- 
GitLab