Skip to content

Commit 5dd4444

Browse files
committed
Updates dl/gan/gan.md
Auto commit by GitBook Editor
1 parent 82e6d0c commit 5dd4444

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dl/gan/gan.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ Discriminator是一个二元分类器,输入是图像,输出是两类:“
6161
其次,要定义loss function才能训练。前面说了,GANs可以看成一个博弈,那么博弈双方都会有cost(代价),如果是零和博弈,那么双方的cost之和为0。Discriminator是一个分类器,它的loss可以定义用交叉熵来定义:
6262
$$J^{(D)}(\theta^{(D)},\theta^{(G)})=-\frac {1}{2}E_{xP\sim _{data}}logD(x)-\frac {1}{2}E_zlog(1-D(G(z)))$$
6363
如果是零和博弈,那么Generator的loss就定义为:
64-
$$J^{(D)}(\theta^{(D)},\theta^{(G)})=-J^{eta^{(D)},\theta^{(G)})=\frac {1}{2}E_{xP\sim _{data}}logD(x)+\frac {1}{2}E_zlog(1-D(G(z)))
65-
6664

65+
$$J^{(D)}(\theta^{(D)},\theta^{(G)})=-J^{eta^{(D)},\theta^{(G)})=\frac {1}{2}E_{xP\sim _{data}}logD(x)+\frac {1}{2}E_zlog(1-D(G(z)))$$
6766
整个优化问题就是一个minmax博弈
6867
![](/images/dl/gan/minmax.png)
6968

0 commit comments

Comments
 (0)