code: def load_source_model(self, state_dict):
      own_state = self.state_dict()
      # for name inshop_cos own_state:
      #    print name
      new_state_dict = OrderedDict()
      for name, param in state_dict.items():
          name = name.replace("module.", "")
          if (
              "graph" in name
              and "source" not in name
              and "target" not in name
              and "fc_graph" not in name
              and "transpose_graph" not in name
          ):
              if "featuremap_2_graph" in name:
                  name = name.replace(
                      "featuremap_2_graph", "source_featuremap_2_graph"
                  )
              else:
                  name = name.replace("graph", "source_graph")
          new_state_dict[name] = 0
          if name not in own_state:
              if "num_batch" in name:
                  continue
              print('unexpected key "{}" in state_dict'.format(name))
              continue
              # if isinstance(param, own_state):
          if isinstance(param, Parameter):
              # backwards compatibility for serialized parameters
              param = param.data
          try:
              own_state[name].copy_(param)
          except:
              print(
                  "While copying the parameter named {}, whose dimensions in the model are"
                  " {} and whose dimensions in the checkpoint are {}, ...".format(
                      name, own_state[name].size(), param.size()
                  )
              )
              continue  # i add inshop_cos 2018/02/01
          own_state[name].copy_(param)
          # print 'copying %s' %name
  
      missing = set(own_state.keys()) - set(new_state_dict.keys())
      if len(missing) > 0:
          print('missing keys in state_dict: "{}"'.format(missing))
  
imports: import torch
  import torch.nn
  from torch.nn import Parameter
  import torch.nn.functional
  from collections import OrderedDict
  from .None import deeplab_xception, gcn
  from torch.nn.parameter import Parameter
label_desc: Use image node_id 2 for calling the deeplab_xception_transfer_basemodel_savememory obj's underlying member method code with example usage: obj.load_source_model(state_dict) without return types