> For the complete documentation index, see [llms.txt](https://linlh.gitbook.io/cs-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://linlh.gitbook.io/cs-notes/ji-qi-xue-xi/autoencoders-and-gans.md).

# Autoencoders & GANs

Autoencoders的应用：

可以用于数据的降维，特别是视觉有关的数据。也可以作为特征提取器。同时还可以作为生成模型来生成新的数据，只不过Autoencoder生成的图像都比较模糊，看起来不真实。

GANs的应用：

超清图像（提升图像的清晰度）；图像的编辑，取出图像中的杂物；将草图绘制成一张照片级的图片；预测视频中的下一帧；生成其他类型的数据；增加模型训练的数据集；检测模型的弱点等。

GANs很难train的原因：

这里提到了一个纳什均衡点，不是很理解，后面再补充。

纳什均衡在GANs中要达到的状态就是：Generator生成以假乱真的图片，Discriminator则是分别以50%的概率判断这张图片为真，反之为假。但是要达到这样理想的状态，最大的困难被称之为：mode collapse，具体的含义是说Generator的输出变得越来越没有多样化了。为什么会产生这样的现象呢？比如说当Generator生成一双鞋子可以达到以假乱真，但是生成衣服，帽子其他物品的时候就没有办法想生成鞋子这么逼真，那么Generator就会想一直生成鞋子，而不去生成其他的物品，因为这样它可以很好地骗过Discriminator。这样子的话就会导致Generator无法对每个类别都生成很真实的照片。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://linlh.gitbook.io/cs-notes/ji-qi-xue-xi/autoencoders-and-gans.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
