class_docstr: Residual attention block for DRL.
class_docstr_tok: ["Residual","attention","block","for","DRL","."]
code: def attention(self, x: torch.Tensor, attn_mask: torch.Tensor):
      attn_mask_ = attn_mask.repeat_interleave(self.n_head, dim=0)
      return self.attn(
          x, x, x, need_weights=False, attn_mask=attn_mask_
      )[0]
  
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 2 for calling the ResidualAttentionBlock obj's underlying member method code with example usage: obj.attention(x, attn_mask) and returns: self