GAN 結構總覽
生成對抗網路 (GAN) 包含兩個部分:
- 產生器會學習產生合理的資料。產生的例項會成為判別器的負面訓練例項。
- 鑑別器會學習如何區分產生器的假資料和真實資料。鑑別器會針對產生不合理結果的產生器處以罰分。
訓練開始時,產生器會產生明顯的假資料,而鑑別器會迅速學會辨別真偽:

隨著訓練的進行,產生器會越來越接近產生可欺騙鑑別器的輸出內容:

最後,如果產生器訓練順利,鑑別器分辨真假圖片的能力就會變差。系統開始將假資料歸類為真實資料,準確度也會降低。

以下是整個系統的相片:

產生器和鑑別器都是神經網路。產生器輸出端直接連接至判別器輸入端。透過反向傳播,判別器的分類會提供信號,讓產生器用來更新權重。
讓我們進一步說明這個系統的各個部分。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-26 (世界標準時間)。
[null,null,["上次更新時間:2025-02-26 (世界標準時間)。"],[[["GANs consist of two neural networks: a generator creating data and a discriminator evaluating its authenticity."],["The generator and discriminator are trained against each other, with the generator aiming to produce realistic data and the discriminator aiming to identify fake data."],["Through continuous training, the generator improves its ability to create realistic data, while the discriminator struggles more with differentiation."],["The ultimate goal is for the generator to create data so realistic that the discriminator cannot distinguish it from real data."]]],[]]