def load(self, checkpoint_dir=None, prefixes=None, saver=None):
        """Loads the saved weights to the model from the checkpoint directory

        Args:
            checkpoint_dir: The path to saved models_art
        """
        if prefixes is None:
            prefixes = self.save_var_prefixes
        if self.saver is None:
            print("[!] Saver is not initialized")
            self._initialize_saver(prefixes=prefixes)

        if saver is None:
            saver = self.saver

        if checkpoint_dir is None:
            checkpoint_dir = self.checkpoint_dir

        if not os.path.isdir(checkpoint_dir):
            try:
                saver.restore(self.sess, checkpoint_dir)
            except Exception:
                print(" [!] Failed to find a checkpoint at {}".format(checkpoint_dir))
        else:
            print(" [-] Reading checkpoints... {} ".format(checkpoint_dir))

            ckpt = tf.train.get_checkpoint_state(checkpoint_dir)
            if ckpt and ckpt.model_checkpoint_path:
                ckpt_name = os.path.basename(ckpt.model_checkpoint_path)
                saver.restore(self.sess, os.path.join(checkpoint_dir, ckpt_name))
            else:
                print(" [!] Failed to find a checkpoint " "within directory {}".format(checkpoint_dir))
                return False

        print(" [*] Checkpoint is read successfully from {}".format(checkpoint_dir))

        return True
Loads the saved weights to the model from the checkpoint directory

        Args:
            checkpoint_dir: The path to saved models_art
        
examples/inverse_gan_author_utils.py