0Pricing
Deep Learning Academy · レッスン

DCGANを構築する

画像生成のための畳み込みGANを作ります

「DCGANを構築する」はCoddyKit上の無料Deep Learning Academyレッスンです。 これはレッスン3/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはDeep Learning Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Deep Learning Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

What DCGAN Adds

A DCGAN is a GAN built from convolutional layers. It swaps dense layers for convolutions, which makes it great at generating realistic images. 🖼️

Generator Grows the Image

The generator uses transposed convolutions to upsample a tiny latent vector step by step into a full-size image.

nn.ConvTranspose2d(100, 256, 4, 1, 0)

Discriminator Shrinks the Image

The discriminator does the reverse: strided convolutions shrink the image down to a single real-or-fake score.

nn.Conv2d(3, 64, 4, 2, 1)

Batch Norm Stabilizes

DCGAN puts batch normalization between layers in both networks. It keeps activations healthy and makes training far more stable.

nn.BatchNorm2d(256)

ReLU in the Generator

The generator uses ReLU activations on its hidden layers to keep gradients flowing as the image is built up.

nn.ReLU(True)

LeakyReLU in the Discriminator

The discriminator prefers LeakyReLU, which lets a small signal through for negative values and avoids dead neurons.

nn.LeakyReLU(0.2, inplace=True)

Tanh on the Output

The generator ends with Tanh, squeezing pixels into the range minus one to one to match normalized training images.

nn.Tanh()

Sigmoid for the Verdict

The discriminator finishes with a sigmoid, turning its final feature into a probability between zero and one.

nn.Sigmoid()

Weight Initialization

DCGAN starts weights from a small normal distribution centered near zero. Good init helps both networks train smoothly from the first step.

nn.init.normal_(m.weight, 0.0, 0.02)

Pick the Latent Size

The latent dimension, often 100, sets how many random numbers seed each image. Larger latents give the generator more room to vary.

nz = 100

Watch Samples as You Train

Save a grid of generated images every few epochs. Watching them get sharper is how you confirm a DCGAN is actually learning.

Quick Check

Which activation belongs at the very end of the generator?

Recap: Building a DCGAN

You assembled a DCGAN: transposed convolutions grow images, strided convolutions judge them, and batch norm keeps it all stable. 🛠️

よくある質問

「DCGANを構築する」レッスンは無料ですか?

はい。「DCGANを構築する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Deep Learning Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Deep Learning Academyコースには全4レッスンが含まれています。

「DCGANを構築する」で何を学びますか?

画像生成のための畳み込みGANを作ります ブラウザで直接実行するハンズオンコードでDeep Learning Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Deep Learning Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのDeep Learning Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン3/4です。

「DCGANを構築する」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このDeep Learning Academyレッスンでコードを書いて実行できますか?

はい。すべてのDeep Learning Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. GeneratorとDiscriminator:競争の仕組み
  2. 敵対的損失
  3. DCGANを構築する
  4. モード崩壊と安定化の工夫
← Deep Learning Academyに戻る