code: def loss(self, C, X_g, X_, alpha, beta, z, E, Zik, Tk):
      const_term = C * tf.log(1e-10 + X_) - X_
      const_term = tf.reduce_sum(const_term, 1)
  
      loss1 = C * tf.log(1e-10 + X_g) - X_g
      loss1 = tf.reduce_sum(loss1, 1)
  
      loss2 = self.log_q(z, alpha + self.B, beta)
      loss2 = const_term * tf.reduce_sum(loss2, 1)
  
      # loss3 = -log_r(E, alpha,beta)
      loss3 = -self.log_r(E, alpha + self.B, beta)
      loss3 = const_term * tf.reduce_sum(loss3, 1)
  
      # The sum of KL terms of all generator's wheights (up to constant terms)
      kl_w = 0.0
      if not self.w_determinist:
          for l in range(0, self.L + 1):
              kl_w += tf.reduce_sum(
                  -0.5
                  * tf.reduce_sum(
                      tf.square(self.generator_params[l]), 1
                  )
              )
  
      # KL Divergence term
      kl_term = (
          (alpha - self.aa - Zik) * tf.digamma(alpha)
          - tf.lgamma(alpha)
          + (self.aa + Zik) * tf.log(beta)
          + alpha * (Tk + self.bb - beta) / beta
      )
      kl_term = -tf.reduce_sum(kl_term, 1)
      return (
          -tf.reduce_mean(loss1 + loss2 + loss3 + kl_term)
          + kl_w / self.aux_data.shape[0]
      )
  
file_path: cornac/cornac/models/pcrl/pcrl.py
imports: import numpy
  import scipy.sparse
  import scipy
  import tensorflow
label_desc: Use image node_id 14 for calling the PCRL_ obj's underlying member method code with example usage: obj.loss(C, X_g, X_, alpha, beta, z, E, Zik, Tk) and returns: unknown