class_docstr: Support TIMM image backbones.
  Refer to https://github.com/rwightman/pytorch-image-models
docstr: Assign an id to each layer. Layer ids will be used in layer-wise lr decay.
  Basically, id gradually increases when going from the output end to
  the input end. The layers defined in this class, e.g., head, have id 0.
  
  Due to different backbone architectures in TIMM, this function may not always return the correct result.
  Thus, you can use "print(json.dumps(name_to_id, indent=2))" to manually check whether
  the layer ids are reasonable.
  
  Returns
  -------
  A dictionary mapping the layer names (keys) to their ids (values).
docstr_tok: ["Assign","an","id","to","each","layer",".","Layer","ids","will","be","used","in","layer-wise","lr","decay",".","Basically",",","id","gradually","increases","when","going","from","the","output","end","to","the","input","end",".","The","layers","defined","in","this","class",",","e.g.",",","head",",","have","id","0",".","Due","to","different","backbone","architectures","in","TIMM",",","this","function","may","not","always","return","the","correct","result",".","Thus",",","you","can","use","``","print","(","json.dumps","(","name_to_id",",","indent=2",")",")","''","to","manually","check","whether","the","layer","ids","are","reasonable",".","Returns","--","--","--","-","A","dictionary","mapping","the","layer","names","(","keys",")","to","their","ids","(","values",")","."]
code: def get_layer_ids(
      self,
  ):
      """
      Assign an id to each layer. Layer ids will be used in layer-wise lr decay.
      Basically, id gradually increases when going from the output end to
      the input end. The layers defined in this class, e.g., head, have id 0.
  
      Due to different backbone architectures in TIMM, this function may not always return the correct result.
      Thus, you can use "print(json.dumps(name_to_id, indent=2))" to manually check whether
      the layer ids are reasonable.
  
      Returns
      -------
      A dictionary mapping the layer names (keys) to their ids (values).
      """
      model_prefix = "model"
      pre_encoder_patterns = (
          "embed",
          "cls_token",
          "stem",
          "bn1",
          "conv1",
      )
      post_encoder_patterns = ("head", "norm", "bn2")
      names = [n for n, _ in self.named_parameters()]
  
      name_to_id, names = assign_layer_ids(
          names=names,
          pre_encoder_patterns=pre_encoder_patterns,
          post_encoder_patterns=post_encoder_patterns,
          model_pre=model_prefix,
      )
  
      if len(names) > 0:
          logger.debug(f"outer layers are treated as head: {names}")
      for n in names:
          assert n not in name_to_id
          name_to_id[n] = 0
  
      return name_to_id
  
imports: import json
  import logging
  import os
  from typing import Dict, List, Optional
  import torch
  from timm import create_model
  from timm.layers.linear import Linear
  from torch import nn
  from ..constants import AUTOMM, COLUMN, COLUMN_FEATURES, FEATURES, IMAGE, IMAGE_VALID_NUM, LABEL, LOGITS, MASKS
  from .utils import assign_layer_ids, get_column_features, get_model_head
label_desc: Use image node_id 11 for calling the TimmAutoModelForImagePrediction obj's underlying member method code with example usage: obj.get_layer_ids() and returns: name_to_id