code: def proc_scale(self, idx, name, param):
      bottom_name = self.net.bottom_names[name][0]
      # find the bn layer before this scaling
      for i, layer in enumerate(self.net.layers):
          if layer.type == "BatchNorm":
              name2 = self.layer_names[i]
              bottom_name2 = self.net.bottom_names[name2][0]
              if bottom_name2 == bottom_name:
                  # scaling and BN share the same bottom, should merge
                  logger.info(
                      "Merge {} and {} into one BatchNorm layer".format(
                          name, name2
                      )
                  )
                  return {
                      name2 + "/beta": param[1].data,
                      name2 + "/gamma": param[0].data,
                  }
      # assume this scaling layer is part of some BN
      logger.error(
          "Could not find a BN layer corresponding to this Scale layer!"
      )
      raise ValueError()
  
file_path: tensorpack/tensorpack/utils/loadcaffe.py
imports: import numpy
  import os
  import sys
  from .None import logger
  from .concurrency import subproc_call
  from .fs import download, get_dataset_path
  from .utils import change_env
label_desc: Use image node_id 6 for calling the CaffeLayerProcessor obj's underlying member method code with example usage: obj.proc_scale(idx, name, param) and returns: dict