code: def param_name_dict():
      """Find out the correspondence between layer names and parameter names."""
  
      layer = caffe_pb2.LayerParameter()
      # get all parameter names (typically underscore case) and corresponding
      # type names (typically camel case), which contain the layer names
      # (note that not all parameters correspond to layers, but we'll ignore that)
      param_names = [
          f.name
          for f in layer.DESCRIPTOR.fields
          if f.name.endswith("_param")
      ]
      param_type_names = [
          type(getattr(layer, s)).__name__ for s in param_names
      ]
      # strip the final '_param' or 'Parameter'
      param_names = [s[: -len("_param")] for s in param_names]
      param_type_names = [
          s[: -len("Parameter")] for s in param_type_names
      ]
      return dict(zip(param_type_names, param_names))
  
file_path: insightface/tools/onnx2caffe/MyCaffe.py
imports: from collections import OrderedDict, Counter
  from caffe.proto import caffe_pb2
  from google import protobuf
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: param_name_dict() and returns: dict