Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
hassaanik
/
Potato-Disease-Classfication
like
0
Model card
Files
Files and versions
Community
32c431e
Potato-Disease-Classfication
/
evaluater.py
hassaanik
Upload 324 files
32c431e
verified
9 months ago
raw
Copy download link
history
blame
Safe
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)