def main():
    config = load_config()
    model = get_model(config)
    model_path = config['model_path']
    logger.info(f'Loading model from {model_path}...')
    utils.load_checkpoint(model_path, model)
    logger.info(f"Sending the model to '{config['device']}'")
    model = model.to(config['device'])
    logger.info('Loading HDF5 datasets...')
    test_loader = get_test_loaders(config)['test']
    for (i, data_pair) in enumerate(test_loader):
        output_file = (('predict_' + str(i)) + '.h5')
        predictor = _get_predictor(model, data_pair, output_file, config)
        predictor.predict()
def main():
    config = load_config()
    model = get_model(config)
    model_path = config['model_path']
    logger.info(f'Loading model from {model_path}...')
    utils.load_checkpoint(model_path, model)
    logger.info(f"Sending the model to '{config['device']}'")
    model = model.to(config['device'])
    logger.info('Loading HDF5 datasets...')
    test_loader = get_test_loaders(config)['test']
    for (i, data_pair) in enumerate(test_loader):
        output_file = (('predict_' + str(i)) + '.h5')
        predictor = _get_predictor(model, data_pair, output_file, config)
        predictor.predict()