hassaanik's picture
Upload 324 files
32c431e verified
raw
history blame
196 Bytes
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)