class_docstr: base class for classfication 
docstr: do transfer learning by init sub vars from other checkpoint. 
docstr_tok: ["do","transfer","learning","by","init","sub","vars","from","other","checkpoint","."]
code: def init_from_checkpoint(self):
      """do transfer learning by init sub vars from other checkpoint."""
      if "transfer" not in self.config["solver"]:
          return
      transfer_cfg = self.config["solver"]["transfer"]
      enable = transfer_cfg["enable"]
      if not enable:
          return
      init_checkpoint = transfer_cfg["ckpt_path"]
      exclude = transfer_cfg["exclude_reg"]
      include = transfer_cfg["include_reg"]
      logging.info(f"Transfer from checkpoint: {init_checkpoint}")
      logging.info(f"Transfer exclude: {exclude}")
      logging.info(f"Transfer include: {include}")
  
      tvars = tf.trainable_variables()
      initialized_variable_names = {}
      if init_checkpoint:
  
          def _filter_by_reg(tvars, include, exclude):
              include = include if include else []
              exclude = exclude if exclude else []
              outs = []
              for var in tvars:
                  name = var.name
                  for reg_str in include:
                      logging.debug(f"var:{name}, reg: {reg_str}")
                      m = re.match(reg_str, name)
                      if m is not None:
                          outs.append(var)
                  for reg_str in exclude:
                      logging.debug(f"var:{name}, reg: {reg_str}")
                      m = re.match(reg_str, name)
                      if m is None:
                          outs.append(var)
              return outs
  
          tvars = _filter_by_reg(tvars, include, exclude)
          (
              assignment_map,
              initialized_variable_names,
          ) = self.get_assignment_map_from_checkpoint(
              tvars, init_checkpoint
          )
          tf.train.init_from_checkpoint(init_checkpoint, assignment_map)
  
      logging.info("**** Trainable Variables ****")
      for var in tvars:
          init_string = ""
          if var.name in initialized_variable_names:
              init_string = ", *INIT_FROM_CKPT*"
          logging.info(
              "  name = %s, shape = %s%s",
              var.name,
              var.shape,
              init_string,
          )
  
imports: import os
  import re
  import functools
  import collections
  from absl import logging
  import delta.compat
  from tensorflow.python import debug
  from tensorflow.python.estimator.canned import metric_keys
  from tensorboard.plugins.pr_curve import summary
  from delta import utils
  from delta.utils.hparam import HParams
  from delta.utils import metrics
  from delta.utils import summary
  from delta.utils.register import registers
  from delta.utils.solver.base_solver import ABCEstimatorSolver
label_desc: Use image node_id 6 for calling the EstimatorSolver obj's underlying member method code with example usage: obj.init_from_checkpoint() and returns: outs