GAN学习笔记

1.原始的GAN

1.1原始的损失函数

1.1.1写法1参考1参考2

1.1.2 写法2

where,

  • G = Generator
  • D = Discriminator
  • Pdata(x) = distribution of real data
  • P(z) = distribution of generator
  • x = sample from Pdata(x)
  • z = sample from P(z)
  • D(x) = Discriminator network
  • G(z) = Generator network

1.1.3 写法3: 参考3

1.2Wasserstein损失 参考

2.**Conditional GAN (**CGAN)

2.1 写法1:

The Discriminator has two task

  • Discriminator has tocorrectly label real images which are coming from training data set as "real".
  • Discriminator has to correctly label generated images which are coming from Generator as "fake".

We need to calculate two losses for the Discriminator. The sum of the "fake" image and "real" image loss is the overall Discriminator loss.** So the loss function of the Discriminator is aiming at minimizing the error of predicting real images coming from the dataset and fake images coming from the Generator given their one-hot labels.

The Generator network has one task

  • To create an image that looks as "real" as possible to fool the Discriminator.

The loss function of the Generator minimizes the correct prediction of the Discriminator on fake images conditioned on the specified one-hot labels.

  • The conditioning is performed by feeding y into the both the discriminator and generator as additional input layer.
  • In the generator the prior input noise p_z (z ), and y are combined in joint hidden representation.
  • In the discriminator x and y are presented as inputs and to a discriminative function.
  • The objective function of a two-player minimax game become:

2.2 写法2:

where is a probability distribution over classes, is the probability distribution of real images of class C, and the probability distribution of images generated by the generator when given class label C.

2.3 写法3:参考

相关推荐
AI成长日志3 小时前
【datawhale】hello agents开源课程学习记录第5章 智能体应用实践:低代码平台构建指南
学习·低代码·开源
GHL2842710905 小时前
RAG相关问题整理学习
学习·ai
程序员夏末5 小时前
【LeetCode | 第七篇】算法笔记
笔记·算法·leetcode
开源盛世!!5 小时前
3.23-3.25笔记
笔记
hanlin037 小时前
刷题笔记:力扣第43、67题(字符串计算)
笔记·算法·leetcode
多看书少吃饭8 小时前
Vue + Java + Python 打造企业级 AI 知识库与任务分发系统(RAG架构全解析)
java·vue.js·笔记
了一梨8 小时前
[T113] 交叉编译 OpenCV 4.5.2 + face 模块
linux·笔记·opencv
知识分享小能手8 小时前
MongoDB入门学习教程,从入门到精通,MongoDB创建、更新和删除文档(3)
数据库·学习·mongodb
困死,根本不会8 小时前
VMware Ubuntu 显示有线连接却无法上网|完整排查与解决笔记
linux·笔记·ubuntu
诗句藏于尽头8 小时前
基于GPT2的底模微调实现微信聊天风格模仿输出
学习·微信