Exemple #1
0
 def evaluate_epoch(engine):
     log_results(logger, 'train/epoch', engine.state, engine.state.epoch)
     state = evaluate_once(evaluator, iterator=iters['val'])
     log_results(logger, 'valid/epoch', state, engine.state.epoch)
     log_results_cmd('valid/epoch', state, engine.state.epoch)
     save_ckpt(args, engine.state.epoch, engine.state.metrics['loss'], model, vocab)
     evaluate_by_logic_level(args, model, iterator=iters['val'])
Exemple #2
0
 def evaluate_epoch(engine):
     log_results(logger, 'train/epoch', engine.state, engine.state.epoch)
     state = evaluate_once(evaluator, iterator=iters['val'])
     log_results(logger, 'valid/epoch', state, engine.state.epoch)
Exemple #3
0
 def log_iter_results(engine):
     log_results(logger, 'train/iter', engine.state, engine.state.iteration)
Exemple #4
0
 def evaluate_epoch(engine):
     log_results(logger, 'pretrain/epoch', engine.state, engine.state.epoch)
Exemple #5
0
 def save_epoch(engine):
     log_results(logger, 'pretrain/epoch', engine.state, engine.state.epoch)
     log_results_cmd(logger, 'pretrain/epoch', engine.state, engine.state.epoch)
     save_ckpt(args, engine.state.epoch, engine.state.metrics['loss'], model)