AI / 大模型架构
GAN 训练流程
生成器、判别器、真实样本、伪样本与损失反馈组成的 GAN 训练闭环。
完整 Prompt
A Generative Adversarial Network training loop diagram. Left — Generator G: - Takes random noise z ~ N(0, I) as input. - Outputs a fake sample G(z) drawn as a small image thumbnail. Right — Discriminator D: - Takes either a real sample x_real (from the dataset block at the top-right) or G(z). - Outputs a probability D(x) in [0, 1]. Center — Loss block: - Adversarial loss for D: L_D = -E[log D(x_real)] - E[log (1 - D(G(z)))]. - Adversarial loss for G: L_G = -E[log D(G(z))] (non-saturating form). Show two gradient arrows: - Solid red arrow: D's gradient updates D's weights. - Solid blue arrow: G's gradient flows back through D into G. Style: clean publication-style schematic, white background, navy / red / blue palette, sans-serif labels.立即试用此 Prompt
适用场景
For generative-modeling papers using a GAN-style training objective.
变体
Conditional GAN
Same loop but add a class label y as additional conditioning input to both G and D. Show y as a separate input arrow into both networks. Update losses to D(x | y) and G(z | y).
使用建议
- Color-code G and D gradient arrows differently — readers track gradient flow visually.
- Show the data block (real samples) outside the loop so it doesn't crowd the center.
- List both losses explicitly. Diagrams without losses miss the training story.
常见问题
Can I show mode collapse in this figure?
Add a small inset chart showing G's sample diversity over training epochs collapsing to a single mode at some step.
