class_docstr: Base class for models
class_docstr_tok: ["Base","class","for","models"]
docstr: Load an existing model.
  
  Args:
      model_path: model path.
  
  Raises:
      IOError: if the restore operation failed.
docstr_tok: ["Load","an","existing","model",".","Args",":","model_path",":","model","path",".","Raises",":","IOError",":","if","the","restore","operation","failed","."]
code: def load_model(self, model_path=None):
      """Load an existing model.
  
      Args:
          model_path: model path.
  
      Raises:
          IOError: if the restore operation failed.
      """
      act_path = self.hparams.load_saved_model
      if model_path is not None:
          act_path = model_path
  
      try:
          self.saver.restore(self.sess, act_path)
      except Exception:
          raise IOError(
              "Failed to find any matching files for {0}".format(
                  act_path
              )
          )
  
imports: from os.path import join
  import abc
  import time
  import os
  import numpy
  import tensorflow
  from recommenders.models.deeprec.deeprec_utils import cal_metric
label_desc: Use image node_id 20 for calling the BaseModel obj's underlying member method code with example usage: obj.load_model(model_path) without return types