The GAN paper shows that for a fixed generator, the best discriminator outputs the ratio of the data density to the sum of the two densities. When the generator matches the data, this ratio is one half everywhere, the equilibrium of the game.
Implement optimal_discriminator(p_data, p_model), returning the density ratio element-wise.
Divide p_data by p_data + p_model.
No results yet
Run your code to check it against the examples, or submit to run every test.