import tensorflow as tf

            logger.warn(Color.yellow('No ckpt file for restore vars, ckpt file is None'))
            return False
        reader = tf.train.NewCheckpointReader(self.restore_ckpt_file)
        saved_shapes = reader.get_variable_to_shape_map()
        if self._var_list is None:
            restore_key2vars = {var.name.split(':')[0]: var for var in tf.global_variables()}
        elif isinstance(self._var_list, list):
            restore_key2vars = {var.name.split(':')[0]: var for var in self._var_list}
        elif isinstance(self._var_list, dict):
            restore_key2vars = self._var_list
