第20章敵対的生成ネットワーク
20.2. Deep Convolutional Generative Adversarial Networks20.2 深層畳み込み敵対的生成ネットワーク
In Section 20.1, we introduced the basic ideas behind how GANs work. We showed that they can draw samples from some simple, easy-to-sample distribution, like a uniform or normal distribution, and transform them into samples that appear to match the distribution of some dataset. And while our example of matching a 2D Gaussian distribution got the point across, it is not especially exciting.
英語のヒント
20.1節では、GANがどう働くかの背後にある基本的な考え方を紹介した。GANは、一様分布や正規分布のような、単純で抜き出しやすい分布から標本を抜き出し、それを何らかのデータセットの分布に合っているように見える標本に変換できることを示した。2次元のガウス分布に合わせるという例は要点を伝えはしたが、特に刺激的なものではない。
In this section, we will demonstrate how you can use GANs to generate photorealistic images. We will be basing our models on the deep convolutional GANs (DCGAN) introduced in Radford et al. (2015). We will borrow the convolutional architecture that have proven so successful for discriminative computer vision problems and show how via GANs, they can be leveraged to generate photorealistic images.
英語のヒント
この節では、GANを使って写真のようにリアルな画像を生成する方法を示す。モデルは、Radford et al.(2015)で紹介された深層畳み込みGAN(DCGAN)にもとづく。識別的なコンピュータビジョンの問題でとても成功してきた畳み込みのアーキテクチャを借りて、それをGANを通じてどう活用すれば写真のようにリアルな画像を生成できるかを示す。
import warnings
import torch
import torchvision
from torch import nn
from d2l import torch as d2l