Skip to content

Commit e942c5d

Browse files
authored
Restore old behavior
1 parent ea94cfb commit e942c5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imagenet/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def train(train_loader, model, criterion, optimizer, epoch, args):
311311

312312
if args.gpu is not None:
313313
input = input.cuda(args.gpu, non_blocking=True)
314-
target = target.cuda(args.gpu, non_blocking=True)
314+
target = target.cuda(args.gpu, non_blocking=True)
315315

316316
if args.arch == 'googlenet':
317317
iter = len(train_loader) * epoch + i
@@ -371,7 +371,7 @@ def validate(val_loader, model, criterion, args):
371371
for i, (input, target) in enumerate(val_loader):
372372
if args.gpu is not None:
373373
input = input.cuda(args.gpu, non_blocking=True)
374-
target = target.cuda(args.gpu, non_blocking=True)
374+
target = target.cuda(args.gpu, non_blocking=True)
375375

376376
# compute output
377377
output = model(input)

0 commit comments

Comments
 (0)