coursera deeplearning
一、Evaluation GAN 评估GAN性能
1、Fidelity 保真性 Diversity 多样性
一般从保真性和多样新的角度评价模型的性能
2、Pixel distance 像素距离 & Feature distance 特征距离
Pixel distance 简单但不可靠
Feature distance 使用图像高层特征更加可靠
3、Feature Extraction 特征提取
一般使用预训练好的模型除去最后的全连接层进行特征提取(也可以使用中间其他层作为输出)
事实上就是将图像映射为一个向量 embedding
模型一般使用Inception v3
4、Fréchet Inception Distance (FID)



Tr : 对角线元素的和
∑ : 协方差矩阵
X : 真实图像的embedding
Y : 生成图像的embedding
一般认为 FID 越小两个分布越接近
关于协方差矩阵:协方差矩阵是计算不同维度之间的协方差
https://blog.csdn.net/xuhang0910/article/details/52421707

5、Inception Score(不理解)
Low entropy -> Fidelity
High entropy -> Diversity


IS值越高越好
KL散度参考:https://www.bilibili.com/video/BV1KK4y1f7TM
缺点:一是对每个类别只生成一个高保真的图片,二是没有对比真实图片样本 ,三是由于使用预训练的分类器进行检测,有可能无法完全检测相关的特征
一般FID要比IS好一些
6、Sampling and Truncation

如果对噪声 z 的采样在均值附近,生成的图片保真度会比较好,但是缺乏多样性,反之亦然
Truncation Trick 截断技巧
指的是设置一个超参数,使得噪声采样的时候,不会采样到分布概率很低的位置,目的是平衡保真度和多样性

HYPE
HYPE指的是利用人力进行评估,包括限制时间的评估和不限制时间的评估

什么是Amazon Mechanical Turk?
https://zhuanlan.zhihu.com/p/150496250
7、Precision and Recall 精确度和召回率
precision -> fidelity
recall -> diversity
Precision : 正确生成的样本数/生成的总样本数

Recall : 生成器能够生成的正确的样本数/总真实的样本数

二、GAN Disadvantages and Bias
1、GAN 优缺点

2、Alternatives to GANs 其他生成模型

3、Machine Bias & Fairness Definitions
对于公平有很多种定义,可以从不同的角度出发来定义不同的计算方式
偏见可以在模型建立的任何一个有人参与的环节引入,包括数据集的收集,标标签的过程,等等
三、StyleGAN and Advancements
1、GAN Improvements
(1)、Stability
生成模型多样性比较好->高标准差
生成模型多样性比较差->低标准差
可以在每批次的生成模型上使用标准差来促进多样性
也可以使用 W 损失函数来实现
(2)、Capacity
使用大的模型训练高分辨率的图像
(3)、Diversity
更大数据集、 minibatch 标准差,模型结构
2、StyleGAN

(1)Progressive Growing
目的是更快更稳定更高分辨率的训练

α : 逐渐从 0 到 1


(2)Noise Mapping Network

Z : 随机噪声
W : 映射之后的随机噪声,维度与 Z 一致
目的是得到 disentangle representation (翻译为:解耦表示?)
Z [entangle] -> W [disentangle]

得到 W 之后将其应用到各个 block (上采样模块)当中
(3)Adaptive Instance Normalization (AdaIN) 自适应实例规范化
第一、归一化

与 BN 归一化不同, AdaIn 的归一化是指对单个样本实例中的单个通道进行归一化,而 BN 归一化是指对 N 个样本实例中的单个通道归一化
第二、自适应




(4)Style and Stochastic Variation
不同的 Z->W 带来不同的风格, W 输入的模块越靠前,控制的风格变化颗粒度越大(越整体), W 输入的模块越靠后,控制的风格变化颗粒度越小(越细节)
Stochastic Variation

Main components

网友评论