2023-07-29 13:40:43 +00:00
|
|
|
import NNlib: sigmoid
|
|
|
|
|
|
|
|
"""
|
|
|
|
Sigmoid beta schedule.
|
|
|
|
|
|
|
|
## Input
|
|
|
|
* `T::Int`: number of timesteps
|
2023-08-04 19:48:59 +00:00
|
|
|
* `β₁::Real=1.0f-4`: initial value of β
|
|
|
|
* `β₋₁::Real=2.0f-2`: final value of β
|
2023-07-29 13:40:43 +00:00
|
|
|
|
|
|
|
## Output
|
|
|
|
* `β::Vector{Real}`: βₜ values at each timestep t
|
|
|
|
|
|
|
|
## References
|
|
|
|
* [[2203.02923] GeoDiff: a Geometric Diffusion Model for Molecular Conformation Generation](https://arxiv.org/abs/2203.02923)
|
|
|
|
* [github.com:MinkaiXu/GeoDiff](https://github.com/MinkaiXu/GeoDiff/blob/ea0ca48045a2f7abfccd7f0df449e45eb6eae638/models/epsnet/diffusion.py#L57)
|
|
|
|
"""
|
2023-08-04 19:48:59 +00:00
|
|
|
function sigmoid_beta_schedule(T::Integer, β₁::Real=1.0f-4, β₋₁::Real=2.0f-2)
|
2023-07-29 13:40:43 +00:00
|
|
|
x = range(start=-6, stop=6, length=T)
|
|
|
|
return sigmoid(x) .* (β₋₁ - β₁) .+ β₁
|
|
|
|
end
|