From 708e0828743054cfce302b1812764cb765221c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 29 Jul 2023 15:51:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20(Schedulers)=20fix=20non=20match?= =?UTF-8?q?ing=20docstrings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Schedulers.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Schedulers.jl b/src/Schedulers.jl index b78539b..1a1abe4 100644 --- a/src/Schedulers.jl +++ b/src/Schedulers.jl @@ -3,16 +3,14 @@ abstract type Scheduler end """ Add noise to clean data using the forward diffusion process. -cf. [[2006.11239] Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006.11239) (Eq. 4) - ## Input * `scheduler::Scheduler`: scheduler to use - * `clean_data::AbstractArray`: clean data to add noise to - * `noise::AbstractArray`: noise to add to clean data - * `timesteps::AbstractArray`: timesteps used to weight the noise + * `x₀::AbstractArray`: clean data to add noise to + * `ϵ::AbstractArray`: noise to add to clean data + * `t::AbstractArray`: timesteps used to weight the noise ## Output - * `noisy_data::AbstractArray`: noisy data at the given timesteps + * `xₜ::AbstractArray`: noisy data at the given timesteps """ function add_noise( scheduler::Scheduler, @@ -23,6 +21,8 @@ function add_noise( ⎷α̅ₜ = scheduler.⎷α̅[t] ⎷β̅ₜ = scheduler.⎷β̅[t] + # noisify clean data + # arxiv:2006.11239 Eq. 4 xₜ = ⎷α̅ₜ' .* x₀ + ⎷β̅ₜ' .* ϵ return xₜ