score-based generative models【公式推导+代码实战】
- 0、前言
- 1、原理介绍
- 1.1Score and Score-Based Models
- 1.2用扩散过程扰动数据Perturbing Data with a Diffusion Process
- 1.3逆扩散过程产生基于分数的生成模型Reversing the Diffusion Process Yields Score-Based Generative Models
- 1.4Score Estimation分数预估
- 2、训练模块----依赖时间的基于分数的模型Time-Dependent Score-Based Model
- 3、代码模块--定义基于时间的基于分数的模型Defining a time-dependent score-based model
- 4、代码模块--使用去噪分数加权和匹配目标进行训练Training with Weighted Sum of Denoising Score Matching Objectives
- 5、代码模块--采样
- 6、对数似然的计算Likelihood Computation
- Reference
0、前言
这篇文章包含score-based generative models的公式推导以及对应的代码实战,有助于全面的理解扩散模型和基于分数的生成模型。
整个项目的代码在:https://download.csdn.net/download/qq_45934285/87635227?spm=1001.2014.3001.5501
本文主要介绍:Score-Based Generative Modeling,其简要介绍为:
通过在噪声扰动后的大规模数据集(noise-perturbed data distributions)上学习一种score functions (gradients of log probability density functions)(得分函数, 一种对梯度的对数似然估计),用朗之万进行采样得到符合训练集的样本. 这种新的生成模型,叫做score-based generative models (or diffusion probabilistic models)
这种score-based generative model有如下的优点:
- 可以得到GAN级别的采样效果,而无需对抗学习(adversarial training)
- 灵活的模型结构
- 精确的对数似然估计计算(exact log-likelihood computation)
- 唯一可识别表征学习(uniquely identifiable representation learning)
- 流程可逆,我理解是不需要像StyleGAN的模型训练一个featur