type
Post
status
Published
date
Feb 6, 2025
slug
summary
GAN算法的个人理解笔记
tags
category
技术分享
icon
password
GAN是generative advertisal network的简称,中文唤做生成式对抗网络。在常规的理解中,generator和discriminator是对抗的关系,包括GAN的原始论文中将generator比做一个做假钞的坏人,将discriminator比做警察,generator产生的假钞越来越逼真,导致警察无法进行判断,两个之间的关系是对抗。
然而李宏毅老师的教程中,
YouTubeGAN Lecture 1 (2018): Introduction
,给了一个更peace and love的例子,将generator比做一个学画画的学生,discriminator会指出这个学生画的画和真实的作品之间的区别,然后generator画的会越来越逼真,真是因吹斯汀呀。

GAN Lecture 1 (2018): Introduction



Structed Learning
让机器输出的是一个序列的任务,称作Structed Learning。
代码实现
参考代码:
GAN implementation from scratch using PyTorch
Explore and run machine learning code with Kaggle Notebooks | Using data from Cats faces 64x64 (For generative models)
伪代码:
训练:
推理:
随便random一个符合维度的向量,都可以生成猫猫图片
