您好,欢迎访问三七文档
当前位置:首页 > IT计算机/网络 > AI人工智能 > GAN (v11)Special Structure (v6)李宏毅深度学习
GenerativeAdversarialNetwork(GAN)RestrictedBoltzmannMachine:~tlkagk/courses/MLDS_2015_2/Lecture/RBM%20(v2).ecm.mp4/index.htmlGibbsSampling:~tlkagk/courses/MLDS_2015_2/Lecture/MRF%20(v2).ecm.mp4/index.htmlOutlook:NIPS2016Tutorial:GenerativeAdversarialNetworks•Author:IanGoodfellow•Paper:•Video::://=/Lot/44547Review:Auto-encoderAscloseaspossibleNNEncoderNNDecodercodeNNDecodercodeRandomlygenerateavectorascodeImage?Review:Auto-encoderNNDecodercode2D-1.51.5−1.50NNDecoder1.50NNDecoderReview:Auto-encoder-1.51.5NNEncoderNNDecodercodeinputoutputAuto-encoderVAENNEncoderinputNNDecoderoutputm1m2m3𝜎1𝜎2𝜎3𝑒3𝑒1𝑒2Fromanormaldistribution𝑐3𝑐1𝑐2X+Minimizereconstructionerror𝑒𝑥𝑝𝜎𝑖−1+𝜎𝑖+𝑚𝑖23𝑖=1exp𝑐𝑖=𝑒𝑥𝑝𝜎𝑖×𝑒𝑖+𝑚𝑖MinimizeAuto-EncodingVariationalBayes,•ItdoesnotreallytrytosimulaterealimagesNNDecodercodeOutputAscloseaspossibleOnepixeldifferencefromthetargetOnepixeldifferencefromthetargetRealisticFakeTheevolutionofgenerationNNGeneratorv1Discri-minatorv1Realimages:NNGeneratorv2Discri-minatorv2NNGeneratorv3Discri-minatorv3BinaryClassifierTheevolutionofgenerationNNGeneratorv1Discri-minatorv1Realimages:NNGeneratorv2Discri-minatorv2NNGeneratorv3Discri-minatorv3GAN-DiscriminatorNNGeneratorv1Realimages:Discri-minatorv1image1/0(realorfake)SomethinglikeDecoderinVAERandomlysampleavector11110000GAN-GeneratorDiscri-minatorv1NNGeneratorv1Randomlysampleavector0.13UpdatingtheparametersofgeneratorTheoutputbeclassifiedas“real”(ascloseto1aspossible)Generator+Discriminator=anetworkUsinggradientdescenttoupdatetheparametersinthegenerator,butfixthediscriminator1.0v2GAN–二次元人物頭像鍊成Sourceofimages::–二次元人物頭像鍊成100roundsGAN–二次元人物頭像鍊成1000roundsGAN–二次元人物頭像鍊成2000roundsGAN–二次元人物頭像鍊成5000roundsGAN–二次元人物頭像鍊成10,000roundsGAN–二次元人物頭像鍊成20,000roundsGAN–二次元人物頭像鍊成50,000roundsBasicIdeaofGANMaximumLikelihoodEstimation•Givenadatadistribution𝑃𝑑𝑎𝑡𝑎𝑥•Wehaveadistribution𝑃𝐺𝑥;𝜃parameterizedby𝜃•E.g.𝑃𝐺𝑥;𝜃isaGaussianMixtureModel,𝜃aremeansandvariancesoftheGaussians•Wewanttofind𝜃suchthat𝑃𝐺𝑥;𝜃closeto𝑃𝑑𝑎𝑡𝑎𝑥Sample𝑥1,𝑥2,…,𝑥𝑚from𝑃𝑑𝑎𝑡𝑎𝑥Wecancompute𝑃𝐺𝑥𝑖;𝜃Likelihoodofgeneratingthesamples𝐿=𝑃𝐺𝑥𝑖;𝜃𝑚𝑖=1Find𝜃∗maximizingthelikelihoodMaximumLikelihoodEstimation𝜃∗=𝑎𝑟𝑔max𝜃𝑃𝐺𝑥𝑖;𝜃𝑚𝑖=1=𝑎𝑟𝑔max𝜃𝑙𝑜𝑔𝑃𝐺𝑥𝑖;𝜃𝑚𝑖=1=𝑎𝑟𝑔max𝜃𝑙𝑜𝑔𝑃𝐺𝑥𝑖;𝜃𝑚𝑖=1≈𝑎𝑟𝑔max𝜃𝐸𝑥~𝑃𝑑𝑎𝑡𝑎[𝑙𝑜𝑔𝑃𝐺𝑥;𝜃]=𝑎𝑟𝑔max𝜃𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝑃𝐺𝑥;𝜃𝑑𝑥𝑥−𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝑃𝑑𝑎𝑡𝑎𝑥𝑑𝑥𝑥=𝑎𝑟𝑔min𝜃𝐾𝐿𝑃𝑑𝑎𝑡𝑎𝑥||𝑃𝐺𝑥;𝜃𝑥1,𝑥2,…,𝑥𝑚from𝑃𝑑𝑎𝑡𝑎𝑥Howtohaveaverygeneral𝑃𝐺𝑥;𝜃?Now𝑃𝐺𝑥;𝜃isaNN𝑃𝐺𝑥=𝑃𝑝𝑟𝑖𝑜𝑟𝑧𝐼𝐺𝑧=𝑥𝑑𝑧𝑧𝐺𝑧=𝑥𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝐺𝑥;𝜃Itisdifficulttocomputethelikelihood.𝑥BasicIdeaofGAN•GeneratorG•Gisafunction,inputz,outputx•GivenapriordistributionPprior(z),aprobabilitydistributionPG(x)isdefinedbyfunctionG•DiscriminatorD•Disafunction,inputx,outputscalar•Evaluatethe“difference”betweenPG(x)andPdata(x)•ThereisafunctionV(G,D).𝐺∗=𝑎𝑟𝑔min𝐺max𝐷𝑉𝐺,𝐷HardtolearnbymaximumlikelihoodBasicIdea𝐺1𝐺2𝐺3𝑉𝐺1,𝐷𝑉𝐺2,𝐷𝑉𝐺3,𝐷𝐷𝐷𝐷𝑉=𝐸𝑥∼𝑃𝑑𝑎𝑡𝑎𝑙𝑜𝑔𝐷𝑥+𝐸𝑥∼𝑃𝐺𝑙𝑜𝑔1−𝐷𝑥GivenageneratorG,max𝐷𝑉𝐺,𝐷evaluatethe“difference”between𝑃𝐺and𝑃𝑑𝑎𝑡𝑎PicktheGdefining𝑃𝐺mostsimilarto𝑃𝑑𝑎𝑡𝑎𝐺∗=𝑎𝑟𝑔min𝐺max𝐷𝑉𝐺,𝐷max𝐷𝑉𝐺,𝐷•GivenG,whatistheoptimalD*maximizing•Givenx,theoptimalD*maximizing𝑉=𝐸𝑥∼𝑃𝑑𝑎𝑡𝑎𝑙𝑜𝑔𝐷𝑥+𝐸𝑥∼𝑃𝐺𝑙𝑜𝑔1−𝐷𝑥𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝐷𝑥+𝑃𝐺𝑥𝑙𝑜𝑔1−𝐷𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝐷𝑥𝑥𝑑𝑥+𝑃𝐺𝑥𝑙𝑜𝑔1−𝐷𝑥𝑥𝑑𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝐷𝑥+𝑃𝐺𝑥𝑙𝑜𝑔1−𝐷𝑥𝑥𝑑𝑥𝐺∗=𝑎𝑟𝑔min𝐺max𝐷𝑉𝐺,𝐷AssumethatD(x)canhaveanyvalueheremax𝐷𝑉𝐺,𝐷•Givenx,theoptimalD*maximizing•FindD*maximizing:f𝐷=a𝑙𝑜𝑔(𝐷)+𝑏𝑙𝑜𝑔1−𝐷𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝐷𝑥+𝑃𝐺𝑥𝑙𝑜𝑔1−𝐷𝑥𝑑f𝐷𝑑𝐷=𝑎×1𝐷+𝑏×11−𝐷×−1=0𝑎×1𝐷∗=𝑏×11−𝐷∗𝑎×1−𝐷∗=𝑏×𝐷∗𝑎−𝑎𝐷∗=𝑏𝐷∗𝐷∗=𝑎𝑎+𝑏𝐷∗𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥𝐺∗=𝑎𝑟𝑔min𝐺max𝐷𝑉𝐺,𝐷aDbD01max𝐷𝑉𝐺,𝐷𝑉𝐺1,𝐷𝑉𝐺2,𝐷𝑉𝐺3,𝐷𝐷𝐷𝐷𝐺∗=𝑎𝑟𝑔min𝐺max𝐷𝑉𝐺,𝐷𝐷1∗𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺1𝑥𝐷2∗𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺2𝑥𝑉𝐺1,𝐷1∗“difference”between𝑃𝐺1and𝑃𝑑𝑎𝑡𝑎max𝐷𝑉𝐺,𝐷=𝐸𝑥∼𝑃𝑑𝑎𝑡𝑎𝑙𝑜𝑔𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥+𝐸𝑥∼𝑃𝐺𝑙𝑜𝑔𝑃𝐺𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑙𝑜𝑔𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥𝑥𝑑𝑥max𝐷𝑉𝐺,𝐷+𝑃𝐺𝑥𝑙𝑜𝑔𝑃𝐺𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥𝑥𝑑𝑥221212+2𝑙𝑜𝑔12𝐷∗𝑥=𝑃𝑑𝑎𝑡𝑎𝑥𝑃𝑑𝑎𝑡𝑎𝑥+𝑃𝐺𝑥=𝑉𝐺,𝐷∗𝑉=𝐸𝑥∼𝑃𝑑𝑎𝑡𝑎𝑙𝑜𝑔𝐷𝑥+𝐸𝑥∼𝑃𝐺𝑙𝑜𝑔1−𝐷𝑥−2𝑙𝑜𝑔2max𝐷𝑉𝐺,𝐷=−2log2+KLPdatax||Pdatax+PGx2=−2𝑙𝑜𝑔2+2𝐽𝑆𝐷𝑃𝑑𝑎𝑡𝑎𝑥||𝑃𝐺𝑥Jensen-Shannondiverg
本文标题:GAN (v11)Special Structure (v6)李宏毅深度学习
链接地址:https://www.777doc.com/doc-4287419 .html