class_docstr: CrossModel for DRL.
class_docstr_tok: ["CrossModel","for","DRL","."]
code: def build_attention_mask(self, attention_mask):
      extended_attention_mask = attention_mask.unsqueeze(1)
      extended_attention_mask = extended_attention_mask.to(
          dtype=self.dtype
      )  # fp16 compatibility
      extended_attention_mask = (
          1.0 - extended_attention_mask
      ) * -1000000.0
      extended_attention_mask = extended_attention_mask.expand(
          -1, attention_mask.size(1), -1
      )
      return extended_attention_mask
  
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 3 for calling the CrossModel obj's underlying member method code with example usage: obj.build_attention_mask(attention_mask) and returns: extended_attention_mask