当前位置:网站首页>Gan: generate adversarial networks
Gan: generate adversarial networks
2022-07-27 13:08:00 【The way of code】
1 principle
For generating countermeasure networks GAN, A simple understanding is that it can be seen as the process of game , We can regard the generative model and the discriminant model as two sides of the game , For example, in the process of criminals making counterfeit money and police identifying counterfeit money :
Generate models G Equivalent to the party making counterfeit money , The purpose is based on the coins seen and the identification technology of the police , Try to generate more real 、 Counterfeit money that the police can't identify . Discriminant model D Equivalent to identifying counterfeit money , Its purpose is to identify the counterfeit money made by criminals as much as possible . In this way, through the contest between the counterfeiter and the counterfeiter and the improvement towards the goal , So that the final generation model can be as real as possible 、 Those who can't judge the true and false Nash equilibrium effect ( The probability of true and false currency is 0.5).
2 Training
generator G Our goal is to cheat the discriminator D, The goal is to be able to distinguish between real data and generated data . therefore , When training the generator , We want to maximize the error , At the same time, we want to minimize the error of the discriminator .
2.1 Discriminant model
The objective function is :
among D(x) It is the output of the discrimination model , It's a 0-1 Real values in the range , The probability used to judge whether the picture is a real picture , among Pr and Pg It represents the distribution of the real image and the data distribution of the generated image , It can be seen that the objective function is to find the discriminant model function that maximizes the sum of the following two formulas D(z), The latter two formulas are an addition form , among :
It refers to putting real data into the discriminant model D(x) The output calculated value and the whole formula value should be as large as possible .
Make the fake data put into the discrimination model D(x) The calculated value of the output is as small as possible and the value of the whole formula is as large as possible .
This integration is to make the objective function as large as possible , Therefore, during training, gradient lifting can be carried out according to the objective function .
2.2 Generate models
The goal is to make the discriminant model unable to distinguish between real pictures and generated pictures , The objective function is :
That is, find the generating function g(z) Make the objective function of the generated model as small as possible .
Learn more about programming , Please pay attention to my official account :

边栏推荐
- SSM practical project - front back separation (easy to understand)
- Nodejs body parser middleware processes post form data of type multipart / form data, and req.body cannot receive data
- 文章复现:SRCNN
- Distributed system architecture theory and components
- 完美指南|如何使用 ODBC 进行无代理 Oracle 数据库监控?
- C program debugging and exception handling (try catch)
- Is it easy to find a job after programmer training and learning
- How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!
- Insert sort summary
- 开源项目丨Taier1.2版本发布,新增工作流、租户绑定简化等多项功能
猜你喜欢

JS true / false array conversion
QT | qcheckbox of control

Will MySQL fail to insert data? Why?

Is it easy to find a job after programmer training and learning

Finally, I was ranked first in the content ranking in the professional field. I haven't been tired in vain during this period. Thanks to CSDN's official platform, I'm lucky and bitter.

SparkSubmit.main()方法提交外部参数,远程提交standalone集群任务

Baoli food listed on Shanghai Stock Exchange: annual revenue of 1.578 billion, market value of 5.8 billion

Distributed system architecture theory and components

Seata 在蚂蚁国际银行业务的落地实践

Set interface
随机推荐
Delay queue performance test
Optimization Practice of Flink OLAP job scheduling and query execution based on ByteDance
Why do you need foreign keys?
Laboratory procedures and references of chloramphenicol acetate
multi-table query
HDU1698_Just a Hook
Photoshop web design tutorial
Do you really understand CMS garbage collector?
Why does MySQL index use b+ tree instead of jump table?
"Game engine light in light out" 4.1 unity shader and OpenGL shader
What should I do if I can't see any tiles on SAP Fiori launchpad?
Four characteristics of transactions (acid):
Basic architecture of data Lake
How can the top 500 enterprises improve their R & D efficiency? Let's see what industry experts say!
Plus SBOM: assembly line BOM pbom
字节跳动的 Flink OLAP 作业调度和查询执行优化实践
Distributed system architecture theory and components
2022 global Vocational Education Industry Development Report
关于2022年3月9日之后Typora登录不了--已解决
详述throw与throws