code: def forward(self, q, a_batch):
      q = self.lstm_q(q)  # bs, seq, Hidden*2
      a_batch = self.lstm_a(a_batch)  # 2bs, seq, Hidden*2
  
      # bs, hid*2
      q = autograd.reduce_mean(q, [1], keepdims=0)
      # (2bs, hid*2)
      a_batch = autograd.reduce_mean(a_batch, [1], keepdims=0)
  
      # 2*(bs, seq, hid*2)
      a_pos, a_neg = autograd.split(
          a_batch, 0, [q.shape[0], q.shape[0]]
      )
  
      sim_pos = autograd.cossim(q, a_pos)
      sim_neg = autograd.cossim(q, a_neg)
      return sim_pos, sim_neg
  
file_path: singa/examples/qabot/qabot_model.py
imports: from singa import autograd, layer, model
label_desc: Use image node_id 2 for calling the QAModel_mean obj's underlying member method code with example usage: obj.forward(q, a_batch) and returns: sim_pos,  sim_neg