class_docstr: Compute CycleConsistency loss in COOT paper (Eq. 8)
  
  Args:
      clip_emb: Embeddings of clips
      clip_mask: Mask
      clip_lens: Number of clips per each video
      sentence_emb: Embeddings of sentences
      sentence_mask: Mask for input language
      sentence_lens: Number of sentences per paragraph
  
  Outputs:
      - ** clip to clip loss**: loss tensor with shape (batch_size,).
      - ** sentence to sentence loss**: loss tensor with shape (batch_size,).
class_docstr_tok: ["Compute","CycleConsistency","loss","in","COOT","paper","(","Eq",".","8",")","Args",":","clip_emb",":","Embeddings","of","clips","clip_mask",":","Mask","clip_lens",":","Number","of","clips","per","each","video","sentence_emb",":","Embeddings","of","sentences","sentence_mask",":","Mask","for","input","language","sentence_lens",":","Number","of","sentences","per","paragraph","Outputs",":","-","*","*","clip","to","clip","loss","*","*",":","loss","tensor","with","shape","(","batch_size",",",")",".","-","*","*","sentence","to","sentence","loss","*","*",":","loss","tensor","with","shape","(","batch_size",",",")","."]
code: def _get_mxn_repr(
      self, source_emb, source_mask, target_emb, target_mask
  ):
      source_rep = source_emb.unsqueeze(2)
      target_rep = target_emb.unsqueeze(1)
      total_mask = (
          source_mask.unsqueeze(2).bool()
          & target_mask.unsqueeze(1).bool()
      )
      return source_rep, target_rep, total_mask
  
file_path: gluon-cv/gluoncv/torch/utils/loss.py
imports: from torch import nn
  import torch
label_desc: Use image node_id 5 for calling the CycleConsistencyCootLoss obj's underlying member method code with example usage: obj._get_mxn_repr(source_emb, source_mask, target_emb, target_mask) and returns: source_rep,  target_rep,  total_mask