code: def __init__(
      self,
      dim,
      num_heads,
      mlp_ratio=4.0,
      qkv_bias=False,
      proj_drop=0.0,
      attn_drop=0.0,
      drop_path=0.0,
      act_layer=nn.GELU,
      norm_layer=nn.LayerNorm,
  ):
      super().__init__()
      self.norm1 = norm_layer(dim)
      self.attn = CrossAttention(
          dim,
          num_heads=num_heads,
          qkv_bias=qkv_bias,
          attn_drop=attn_drop,
          proj_drop=proj_drop,
      )
      # NOTE: drop path for stochastic depth, we shall see if this is better than dropout here
      self.drop_path = (
          DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
      )
  
imports: from functools import partial
  from typing import List
  from typing import Tuple
  import torch
  import torch.hub
  import torch.nn
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import DropPath, to_2tuple, trunc_normal_, _assert
  from ._builder import build_model_with_cfg
  from ._features_fx import register_notrace_function
  from ._registry import register_model, generate_default_cfgs
  from .vision_transformer import Block
label_desc: Use image node_id 1 to create a new CrossAttentionBlock object from inherited base classes: nn with example: obj = CrossAttentionBlock(dim, num_heads, mlp_ratio, qkv_bias, proj_drop, attn_drop, drop_path, act_layer, norm_layer)