def _load_state_dict_pre_hook(self, state_dict, prefix, local_meta, *args,
                                  **kwargs):
        """A hook function to load weights of deconv layers from
        :class:`HeatmapHead` into `simplebaseline_head`.

        The hook will be automatically registered during initialization.
        """

        # convert old-version state dict
        keys = list(state_dict.keys())
        for _k in keys:
            if not _k.startswith(prefix):
                continue
            v = state_dict.pop(_k)
            k = _k.lstrip(prefix)

            k_new = _k
            k_parts = k.split('.')
            if self.simplebaseline_head is not None:
                if k_parts[0] == 'conv_layers':
                    k_new = (
                        prefix + 'simplebaseline_head.deconv_layers.' +
                        '.'.join(k_parts[1:]))
                elif k_parts[0] == 'final_layer':
                    k_new = prefix + 'simplebaseline_head.' + k

            state_dict[k_new] = v
A hook function to load weights of deconv layers from
        :class:`HeatmapHead` into `simplebaseline_head`.

        The hook will be automatically registered during initialization.
        
mmpose/mmpose/models/heads/regression_heads/integral_regression_head.py