molprop.inference.eval
- molprop.inference.eval(model, loader, args, device, scores=None, target_norm_subtrahent=None, target_norm_denumerator=None, keep_infer_results=False)
Used to calculate validation metrics.
- Parameters:
model (torch.nn.Module) – Trained model used for inference.
loader (torch.utils.data.DataLoader) – Provides dataset for inference.
args – Parameters defined in defaultconfig.yaml.
device – Device on which the inference is performed.
- Returns:
raw_metric_epoch (float) and metric_epoch (float) are teh validation metrics. If keep_infer_results is True, the results of infer() are also returned.
- Return type:
tuple