code: def reset_cls_layer_weight(model, weight):
      if type(weight) == str:
          print_log(f"Resetting cls_layer_weight from file: {weight}")
          zs_weight = (
              torch.tensor(np.load(weight), dtype=torch.float32)
              .permute(1, 0)
              .contiguous()
          )  # D x C
      else:
          zs_weight = weight
      zs_weight = torch.cat(
          [zs_weight, zs_weight.new_zeros((zs_weight.shape[0], 1))],
          dim=1,
      )  # D x (C + 1)
      zs_weight = F.normalize(zs_weight, p=2, dim=0)
      zs_weight = zs_weight.to("cuda")
      num_classes = zs_weight.shape[-1]
  
      for bbox_head in model.roi_head.bbox_head:
          bbox_head.num_classes = num_classes
          del bbox_head.fc_cls.zs_weight
          bbox_head.fc_cls.zs_weight = zs_weight
  
file_path: mmdetection/projects/Detic/detic/utils.py
imports: import numpy
  import torch
  import torch.nn.functional
  from mmengine.logging import print_log
  from .text_encoder import CLIPTextEncoder
label_desc: Use image node_id 3 for calling a global function with example usage: reset_cls_layer_weight(model, weight) without return types