class_docstr: Solver for raw tensorflow model.
class_docstr_tok: ["Solver","for","raw","tensorflow","model","."]
docstr: Initialize the variables of the pretrained model
  according to fine-tune of feature mode
docstr_tok: ["Initialize","the","variables","of","the","pretrained","model","according","to","fine-tune","of","feature","mode"]
code: def initialize_pretrained_model_variables(
      self, pretrained_model_path, pretrained_model_mode
  ):
      """
      Initialize the variables of the pretrained model
      according to fine-tune of feature mode
      """
      all_variables = tf.get_collection_ref(
          tf.GraphKeys.GLOBAL_VARIABLES
      )
      init_checkpoint = pretrained_model_path
      (
          pretrained_assignment_map,
          init_set,
      ) = self.get_assignment_map_from_checkpoint(
          all_variables, init_checkpoint
      )
      tf.train.init_from_checkpoint(
          init_checkpoint, pretrained_assignment_map
      )
  
      if pretrained_model_mode == "feature":
          self.remove_trainable_variables(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 4 for calling the RawPretrainClassSolver obj's underlying member method code with example usage: obj.initialize_pretrained_model_variables(pretrained_model_path, pretrained_model_mode) without return types