File:Wasserstein-GAN critic vs GAN discriminator.svg
Summary
Description |
English: Generated in Julia 1.7.2 by
```julia using Distributions μ = Normal(0, 1) ν = Normal(2, 2) using Roots cdfdiff = (x -> cdf(μ, x) - cdf(ν, x)) cdfzeros = find_zeros(cdfdiff, -5, 5) function optimalf(x) return 0.5 - 0.1*abs(x-cdfzeros[1]) end function optimalD(x) return 0.4 * pdf(ν, x)/(pdf(μ, x) + pdf(ν, x)) end function logminusoptimalD(x) return log(1-optimalD(x))+0.6 end using StatsPlots using LaTeXStrings p1 = plot(μ; label="Generator's distribution") plot!(ν; label="reference distribution")
vline!(cdfzeros; linestyle=:dashdot, label="equal CDF") plot!(optimalf;label="optimal Wasserstein critic (scaled)") plot!(optimalD; label="optimal GAN discriminator (scaled)") scene = plot(p1, size=(800,400), xlim=(-4, 4), ylim=(-0.3, 0.5), legend=:bottomright, legendfont=9) ``` |
Date | |
Source | Own work |
Author | Cosmia Nebula |
Licensing
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.