code: def build_losses(self, vecpos, vecneg):
      # the Wasserstein-GAN losses
      self.d_loss = tf.reduce_mean(vecneg - vecpos, name="d_loss")
      self.g_loss = tf.negative(tf.reduce_mean(vecneg), name="g_loss")
      add_moving_summary(self.d_loss, self.g_loss)
  
file_path: tensorpack/examples/GAN/WGAN.py
imports: import tensorflow
  from tensorpack import *
  from tensorpack.tfutils.summary import add_moving_summary
  import DCGAN
  from GAN import SeparateGANTrainer
label_desc: Use image node_id 1 for calling the Model obj's underlying member method code with example usage: obj.build_losses(vecpos, vecneg) without return types