Latent Space and Autoencoders (AE)

The "Latent Space" is the vector space within which the vectors that make up the topics found by LDA are found. These topics are latent within the text - that is, they are not immediately apparent, but are found or discovered by the LDA algorithm.

https://hackernoon.com/latent-space-visualization-deep-learning-bits-2-bd09a46920df?gi=44964379e8c8

What’s the latent space ?

An autoencoder is made of two components, here’s a quick reminder. The encoder brings the data from a high dimensional input to a bottleneck layer, where the number of neurons is the smallest. Then, the decoder takes this encoded input and converts it back to the original input shape — in our case an image. The latent space is the space in which the data lies in the bottleneck layer.

自动编码器由两个组件组成,encoder decoder 。编码器将数据从高维输入带到瓶颈层,瓶颈层的神经元数量最小。然后,解码器接收这个编码的输入并将其转换回原始输入形状。潜在空间是数据位于瓶颈层的空间。

The latent space contains a compressed representation of the image, which is the only information the decoder is allowed to use to try to reconstruct the input as faithfullyas possible. To perform well, the network has to learn to extract the most relevant features in the bottleneck.

潜在空间包含图像的压缩表示,它是解码器可以用来尽可能真实地重构输入的唯一信息。为了更好地执行,网络必须学会在瓶颈层中提取最相关的特性。

https://hackernoon.com/autoencoders-deep-learning-bits-1-11731e200694

What’s an autoencoder?

Neural networks exist in all shapes and sizes, and are often characterized by their input and output data type. For instance, image classifiers are built with Convolutional Neural Networks. They take images as inputs, and output a probability distribution of the classes.

神经网络存在于各种形状和大小,通常由其输入和输出数据类型来描述。例如,图像分类器是用卷积神经网络构建的。它们将图像作为输入,并输出类的概率分布。

Autoencoders (AE) are a family of neural networks for which the input is the same as the output*. They work by compressing the input into a latent-space representation, and then reconstructing the output from this representation.

自动编码器(AE)是一组神经网络,其输入与输出是相同的*。它们的工作原理是将输入压缩到一个存储空间表示中,然后根据这个表示重新构造输出。

Simple Autoencoder architecture — The input is compressed and then reconstructed

简单的自动编码器架构-输入被压缩,然后重建

Convolutional Autoencoders

A really popular use for autoencoders is to apply them to images. The trick is to replace fully connected layers by convolutional layers. These, along with pooling layers, convert the input from wide and thin (let’s say 100 x 100 px with 3 channels — RGB) to narrow and thick. This helps the network extract visual features from the images, and therefore obtain a much more accurate latent space representation. The reconstruction process uses upsampling and convolutions.

自动编码器的一个非常流行的用途是将它们应用于图像。诀窍是用卷积层替换完全连接的层。这些,连同池化层,将输入从宽和薄(假设有3个通道- RGB, 100 x 100 px)转换为窄和厚。这有助于网络从图像中提取视觉特征,从而获得更准确的潜在空间表示。重建过程使用上采样和卷积。

The resulting network is called a Convolutional Autoencoder (CAE). 得到的网络称为卷积自动编码器(CAE)。

Convolutional Autoencoder architecture — It maps a wide and thin input space to narrow and thick latent space

它将一个宽而薄的输入空间映射为窄而厚的潜在空间

Reconstruction quality

The reconstruction of the input image is often blurry and of lower quality. This is a consequence of the compression during which we have lost some information.

输入图像的重建往往是模糊和低质量的。这是压缩的结果,在压缩过程中我们丢失了一些信息。

The CAE is trained to reconstruct its input。The reconstructed image is blurry

Use of CAEs

Example 1: Ultra-basic image reconstruction

Convolutional autoencoders can be useful forreconstruction

Example 2: Ultra-basic image colorization

In this example, the CAE will learn to map from an image of circles and squares to the same image, but with the circles colored in red, and the squares in blue

猜你喜欢

转载自blog.csdn.net/redredblue/article/details/88911722
AE
今日推荐