def run_validation(engine):
    epoch = trainer.state.epoch
    state = train_evaluator.run(train_loader)
    log_metrics(logger, epoch, state.times['COMPLETED'], 'Train', state.metrics)
    state = evaluator.run(test_loader)
    log_metrics(logger, epoch, state.times['COMPLETED'], 'Test', state.metrics)
def run_validation(engine):
    epoch = trainer.state.epoch
    state = train_evaluator.run(train_loader)
    log_metrics(logger, epoch, state.times['COMPLETED'], 'Train', state.metrics)
    state = evaluator.run(test_loader)
    log_metrics(logger, epoch, state.times['COMPLETED'], 'Test', state.metrics)