Source code for torch_geometric.graphgym.utils.epoch

from torch_geometric.graphgym.config import cfg


[docs]def is_eval_epoch(cur_epoch): """Determines if the model should be evaluated at the current epoch.""" return ((cur_epoch + 1) % cfg.train.eval_period == 0 or cur_epoch == 0 or (cur_epoch + 1) == cfg.optim.max_epoch)
[docs]def is_ckpt_epoch(cur_epoch): """Determines if the model should be evaluated at the current epoch.""" return ((cur_epoch + 1) % cfg.train.ckpt_period == 0 or (cur_epoch + 1) == cfg.optim.max_epoch)