code: def simgcl_loss(config, predictions):
      """doc"""
      log.info("use simgcl loss")
      nfeat = predictions["nfeat"]
      src_feat = predictions["src_nfeat"]
  
      noise = paddle.uniform(
          paddle.shape(nfeat), dtype="float32", min=0.0, max=1.0
      )
      noise = noise * paddle.sign(nfeat)
      ratio = 0.5
      noised_nfeat = src_feat + noise * ratio
  
      neighbor_dsts_feat_all = [noised_nfeat]
  
      for neg in range(config.neg_num):
          neighbor_dsts_feat_all.append(
              F.contrib.layers.shuffle_batch(neighbor_dsts_feat_all[0])
          )
      neighbor_dsts_feat = paddle.concat(neighbor_dsts_feat_all, axis=1)
  
      noised_logits = paddle.matmul(
          src_feat, neighbor_dsts_feat, transpose_y=True
      )
      # noised_logits [batch_size, 1]
  
      tao = 5
      # equal to L.elementwise_div(logits, 1/tao) and it will boardcast automatically
      noised_logits = noised_logits * tao
      noised_logits = paddle.squeeze(noised_logits, [1])
      labels = paddle.zeros(
          [paddle.shape(noised_logits)[0], 1], dtype="int64"
      )
      loss = paddle.nn.functional.softmax_with_cross_entropy(
          noised_logits, labels
      )
      loss = paddle.sum(loss)
      return loss
  
file_path: PGL/apps/PGLBox/src/models/loss.py
imports: import os
  import sys
  import math
  import time
  import numpy
  import pickle
  import paddle
  import paddle.static
  import paddle.fluid
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 5 for calling a global function with example usage: simgcl_loss(config, predictions) and returns: loss