class_docstr: Solver for raw tensorflow model.
class_docstr_tok: ["Solver","for","raw","tensorflow","model","."]
docstr: Get the map of the current variables and init checkpoint variables.
docstr_tok: ["Get","the","map","of","the","current","variables","and","init","checkpoint","variables","."]
code: def get_assignment_map_from_checkpoint(
      self, all_variables, init_checkpoint
  ):
      """
      Get the map of the current variables and init checkpoint variables.
      """
      assignment_map = {}
      name_to_var = {}
      init_set = set()
      for var in all_variables:
          name = var.name
          m = re.match("^(.*):\\d+$", name)
          if m is not None:
              name = m.group(1)
          name_to_var[name] = var
  
      init_vars = tf.train.list_variables(init_checkpoint)
  
      for name, var_shape in init_vars:
          for k, v in name_to_var.items():
              if re.findall(name + "$", k):
                  assignment_map[name] = name_to_var[k]
                  init_set.add(k)
      return assignment_map, init_set
  
file_path: delta/delta/utils/solver/raw_pretrain_cls_solver.py
imports: import re
  import logging
  import delta.compat
  from delta.utils.register import registers
  from delta.utils.solver.raw_solver import RawSolver
label_desc: Use image node_id 2 for calling the RawPretrainClassSolver obj's underlying member method code with example usage: obj.get_assignment_map_from_checkpoint(all_variables, init_checkpoint) and returns: assignment_map,  init_set