def _load_state_dict_mapping(self, ckpt_model):
    model = self.trainer.model
    attr_mapping = {'image_feature_encoders': 'img_feat_encoders', 'image_feature_embeddings_list': 'img_embeddings_list', 'image_text_multi_modal_combine_layer': 'multi_modal_combine_layer', 'text_embeddings': 'text_embeddings', 'classifier': 'classifier'}
    data_parallel = registry.get('data_parallel')
    if (not data_parallel):
        for key in attr_mapping:
            attr_mapping[key.replace('module.', '')] = attr_mapping[key]
            attr_mapping.pop(key)
    for key in attr_mapping:
        getattr(model, key).load_state_dict(ckpt_model[attr_mapping[key]])
def _load_state_dict_mapping(self, ckpt_model):
    model = self.trainer.model
    attr_mapping = {'image_feature_encoders': 'img_feat_encoders', 'image_feature_embeddings_list': 'img_embeddings_list', 'image_text_multi_modal_combine_layer': 'multi_modal_combine_layer', 'text_embeddings': 'text_embeddings', 'classifier': 'classifier'}
    data_parallel = registry.get('data_parallel')
    if (not data_parallel):
        for key in attr_mapping:
            attr_mapping[key.replace('module.', )] = attr_mapping[key]
            attr_mapping.pop(key)
    for key in attr_mapping:
        getattr(model, key).load_state_dict(ckpt_model[attr_mapping[key]])