code: def _build_restore_fn(self, sess):
      init_fn = None
  
      if FLAGS["pretrained_model_checkpoint_path"]:
          print("Loading whole model ...")
          variables_to_restore = slim.get_model_variables()
          init_fn = slim.assign_from_checkpoint_fn(
              FLAGS["pretrained_model_checkpoint_path"],
              variables_to_restore,
              ignore_missing_vars=True,
          )
      return init_fn
  
file_path: insightface/reconstruction/ostec/external/landmark_detector/networks.py
imports: import tensorflow
  from external.landmark_detector import utils, models, data_provider
  from tensorflow.python.platform import tf_logging
  from external.landmark_detector.flags import FLAGS
label_desc: Use image node_id 6 for calling the DeepNetwork obj's underlying member method code with example usage: obj._build_restore_fn(sess) and returns: init_fn