Search

SGAN: Semi-supervised GAN

Real Data

pmodel(y=k+1x)=exp(lk+1)Σj=1k+1exp(lj)p_{model}(y=k+1|x)=\frac{exp(l_{k+1})}{\Sigma^{k+1}_{j=1}exp(l_j)}

Fake Data

pmodel(y=k+1x,i<k+1)=exp(li)Σj=1k+1exp(lj)p_{model}(y=k+1|x,i<k+1)=\frac{exp(l_{i})}{\Sigma^{k+1}_{j=1}exp(l_j)}

Discriminator Loss

LD=LDsupervised+LDunsupervisedL_D=L_{D_{supervised}}+L_{D_{unsupervised}}
LDsup.=Ex,y pdatalog[pmodel(y=ix,i<k+1)]L_{D_{sup.}}=-\mathbb{E}_{x,y~p_{data}}log[p_{model}(y=i|x,i<k+1)]
→ 이미 class를 알고 있기 때문에.
LDunsup.=L_{D_{unsup.}}=
Ex,y pdatalog[1pmodel(y=k+1x)]\mathbb{-E}_{x,y~p_{data}}log[1-p_{model}(y=k+1|x)]
Ex Glog[pmodel(y=k+1x)]-\mathbb{E}_{x~G}log[p_{model}(y=k+1|x)]
→ real data를 '진짜'로 분류하는 것 + fake data를 '가짜'로 분류해야 하는 것

Generator Loss

LGfeaturematching=Ex pdataf(x)Ex Gf(x)22L_{G_{feature matching}}=||\mathbb{E}_{x~p_{data}}f(x)-\mathbb{E}_{x~G}f(x)||^2_2