code: def decoder(self, embedding, embedding_pos, embedding_negs):
      logits = tf.matmul(
          self.kernel(embedding), embedding_pos, transpose_b=True
      )
      neg_logits = tf.matmul(
          self.kernel(embedding_negs), embedding_pos, transpose_b=True
      )
      metric = self.metric_class(logits, neg_logits)
  
      true_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.ones_like(logits), logits=logits
      )
      negative_xent = tf.nn.sigmoid_cross_entropy_with_logits(
          labels=tf.zeros_like(neg_logits), logits=neg_logits
      )
      loss = tf.reduce_mean(
          tf.concat(
              [
                  tf.reshape(true_xent, [-1, 1]),
                  tf.reshape(negative_xent, [-1, 1]),
              ],
              0,
          )
      )
      return loss, metric
  
file_path: euler/examples/dgi/dgi.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  import tf_euler
label_desc: Use image node_id 3 for calling the DGIBase obj's underlying member method code with example usage: obj.decoder(embedding, embedding_pos, embedding_negs) and returns: loss,  metric