yang-song / score_sde_pytorch

PyTorch implementation for Score-Based Generative Modeling through Stochastic Differential Equations (ICLR 2021, Oral)
https://arxiv.org/abs/2011.13456
Apache License 2.0
1.59k stars 294 forks source link

Sample epsilon iteratively #10

Open shichenlai opened 2 years ago

shichenlai commented 2 years ago

https://github.com/yang-song/score_sde_pytorch/blob/1618ddea340f3e4a2ed7852a0694a809775cf8d0/likelihood.py#L85

For the sake of unbiased estimator, wonder whether epsilon need to be resampled in each iteration of ode solver?

yang-song commented 2 years ago

It doesn't need to be resampled in each iteration of the ode solver, otherwise the ode solver might not converge at all. It is still an unbiased estimator even if the ode solver uses the same epsilon for all iterations. This implementation is the same as used in neural ODEs.