📝 fix some more docstrings

This commit is contained in:
Laureηt 2023-07-27 21:18:49 +02:00
parent 96be7c3307
commit 7bff487a75
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
2 changed files with 14 additions and 13 deletions

View file

@ -3,7 +3,7 @@ include("Schedulers.jl")
"""
Denoising Diffusion Probabilistic Models (DDPM) scheduler.
https://arxiv.org/abs/2006.11239
cf. [[2006.11239] Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006).
"""
struct DDPM{V<:AbstractVector} <: Scheduler
# number of diffusion steps used to train the model.
@ -41,14 +41,15 @@ end
"""
Remove noise from model output using the backward diffusion process.
Args:
scheduler (`DDPM`): scheduler object.
sample (`AbstractArray`): sample to remove noise from, i.e. model_input.
model_output (`AbstractArray`): predicted noise from the model.
timesteps (`AbstractArray`): timesteps to remove noise from.
## Input
* scheduler (`DDPM`): scheduler to use
* sample (`AbstractArray`): sample to remove noise from, i.e. model_input
* model_output (`AbstractArray`): predicted noise from the model
* timesteps (`AbstractArray`): timesteps to remove noise from
Returns:
`AbstractArray`: denoised model output at the given timestep.
## Output
* pred_prev_sample (`AbstractArray`): denoised sample at t=t-1
* x_0_pred (`AbstractArray`): denoised sample at t=0
"""
function step(
scheduler::DDPM,

View file

@ -4,13 +4,13 @@ abstract type Scheduler end
Add noise to clean data using the forward diffusion process.
## 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.
* 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
## Output
* noisy_data (`AbstractArray`): noisy data at the given timesteps.
* noisy_data (`AbstractArray`): noisy data at the given timesteps
"""
function add_noise(
scheduler::Scheduler,