File size: 202 Bytes
eecd883 |
1 2 3 4 5 6 7 |
import torch
@torch.no_grad()
def evaluate(model, val_loader):
model.eval()
outputs = [model.validation_step(batch) for batch in val_loader]
return model.validation_epoch_end(outputs) |