code: def gan_objective(
      gen_params, dsc_params, real_data, num_samples, noise_dim, rs
  ):
      fake_data = generate_from_noise(
          gen_params, num_samples, noise_dim, rs
      )
      logprobs_fake = logsigmoid(
          neural_net_predict(dsc_params, fake_data)
      )
      logprobs_real = logsigmoid(
          neural_net_predict(dsc_params, real_data)
      )
      return np.mean(logprobs_real) - np.mean(logprobs_fake)
  
file_path: autograd/examples/generative_adversarial_net.py
imports: from __future__ import absolute_import, division
  from __future__ import print_function
  import autograd.numpy
  import autograd.numpy.random
  from autograd import grad
  from autograd.misc import flatten
  from data import load_mnist, save_images
label_desc: Use image node_id 8 for calling a global function with example usage: gan_objective(gen_params, dsc_params, real_data, num_samples, noise_dim, rs) and returns: unknown