class_docstr: CrossModel for DRL.
class_docstr_tok: ["CrossModel","for","DRL","."]
code: def forward(
      self,
      concat_input,
      concat_type=None,
      attention_mask=None,
      output_all_encoded_layers=True,
  ):
      _ = output_all_encoded_layers
      if attention_mask is None:
          attention_mask = torch.ones(
              concat_input.size(0), concat_input.size(1)
          )
      if concat_type is None:
          concat_type = torch.zeros_like(attention_mask)
  
      extended_attention_mask = self.build_attention_mask(
          attention_mask
      )
  
      embedding_output = self.embeddings(concat_input, concat_type)
      embedding_output = embedding_output.permute(1, 0, 2)  # NLD -> LND
      embedding_output = self.transformer(
          embedding_output, extended_attention_mask
      )
      embedding_output = embedding_output.permute(1, 0, 2)  # LND -> NLD
  
      pooled_output = self.pooler(
          embedding_output, hidden_mask=attention_mask
      )
  
      return embedding_output, pooled_output
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  import torch
  from torch import nn
  from towhee.models.drl.until_module import LayerNorm
  from collections import OrderedDict
label_desc: Use image node_id 4 for calling the CrossModel obj's underlying member method code with example usage: obj.forward(concat_input, concat_type, attention_mask, output_all_encoded_layers) and returns: embedding_output,  pooled_output