class_docstr: " Focal Modulation Networks (FocalNets)
      
class_docstr_tok: ["``","Focal","Modulation","Networks","(","FocalNets",")"]
code: def group_matcher(self, coarse=False):
      return dict(
          stem=r"^stem",
          blocks=[(r"^layers\.(\d+)", None), (r"^norm", (99999,))]
          if coarse
          else [
              (r"^layers\.(\d+).downsample", (0,)),
              (r"^layers\.(\d+)\.\w+\.(\d+)", None),
              (r"^norm", (99999,)),
          ],
      )
  
imports: from functools import partial
  from typing import Callable, Optional, Tuple
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
  from timm.layers import Mlp, DropPath, LayerNorm2d, trunc_normal_, ClassifierHead, NormMlpClassifierHead
  from ._builder import build_model_with_cfg
  from ._manipulate import named_apply
  from ._registry import generate_default_cfgs, register_model
label_desc: Use image node_id 3 for calling the FocalNet obj's underlying member method code with example usage: obj.group_matcher(coarse) and returns: dict