def is_eval_epoch(cfg, cur_epoch, multigrid_schedule=None):
    """
    Determine if the model should be evaluated at the current epoch.
    Args:
        cfg (Config): the global config object.
        cur_epoch (int): current epoch.
        multigrid_schedule (List): schedule for multigrid training.
    """
    if cfg.TRAIN.EVAL_PERIOD == 0:
        return False
    if cur_epoch + 1 >= cfg.OPTIMIZER.MAX_EPOCH - 10 and (not cfg.PRETRAIN.ENABLE):
        return True
    return (cur_epoch + 1) % cfg.TRAIN.EVAL_PERIOD == 0