文章目录

  • 1. 基本概念
  • 2. 应用
  • 2.1 de-noising auto-encoder
  • 2.2 feature disentangle
  • 2.3 discrete representation
  • 2.4 text as representation
  • 2.5 Tree as representation
  • 2.6 generator
  • 2.7 compression
  • 2.8 anomaly detection


1. 基本概念

Auto-encoder包含一个encoder和一个decoder,encoder将原始图片转化为一个低维度的vector,并且期望vector能够尽可能地保留输入图片的特征,这样decoder可以将Vector还原为原始图像,和输入图像越接近越好。

自编码器 python代码解析_异常检测


为什么vector可以还原为原始图像呢?假设原始图像为自编码器 python代码解析_自编码器 python代码解析_02大小,在有些情况下,输入图像可能只包含下图所示的两种类型,那么就可以用2维的向量表示原始图像。这样一来,就可以降低维度,减少运算量。

自编码器 python代码解析_自编码器 python代码解析_03

2. 应用

2.1 de-noising auto-encoder

de-noising auto-encoder为auto-encoder的一种用法,利用auto-encoder去除噪声。

自编码器 python代码解析_异常检测_04

2.2 feature disentangle

因为auto-encoder得到的向量具有原始输入信号的一些信息(图像的纹理、颜色;音频的内容、银色等),feature disentangle利用auto-encoder的向量中的这些信息提取出来,用于下游任务。

自编码器 python代码解析_计算机视觉_05


例如,如果想要做变声器,就可以将提取的向量中代表音色的维度替换,代表内容的维度保留。

自编码器 python代码解析_计算机视觉_06

2.3 discrete representation

discrete representation希望通过对vector进行一些限制,使得其可以解决特定的任务。例如生成的vector是one-hot向量,那么就可以使得其传递的信息是分类的结果。

自编码器 python代码解析_异常检测_07

2.4 text as representation

text as representation将原本的输入和输出从向量变成文字,encoder和decoder用seq2se1代替,通过这样的方式得到摘要。

但是由于机器生成的“摘要”不满足正常的文本(无法阅读),因此需要添加额外的discriminator来进行鉴别。生成的摘要要尽量骗过discriminator。

自编码器 python代码解析_自编码器 python代码解析_08

2.5 Tree as representation

自编码器 python代码解析_计算机视觉_09

2.6 generator

Auto-encoder的decoder部分可以用作generator

自编码器 python代码解析_机器学习_10

2.7 compression

Auto-encoder还可以用作压缩。

自编码器 python代码解析_机器学习_11

2.8 anomaly detection

auto-encoder还可以用作异常检测,如果输入和输出相差较大,则认为输入是异常的,是训练的时候没有见过的图片。

自编码器 python代码解析_自编码器 python代码解析_12