Merge pull request #2 from zhunzhong07/patch-1

Fix bug for prefetcher
pull/6/head
Ross Wightman 6 years ago committed by GitHub
commit 337702d51b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -428,6 +428,9 @@ def validate(model, loader, loss_fn, args):
with torch.no_grad():
for batch_idx, (input, target) in enumerate(loader):
last_batch = batch_idx == last_idx
if not args.prefetcher:
input = input.cuda()
target = target.cuda()
output = model(input)
if isinstance(output, (tuple, list)):

Loading…
Cancel
Save