Skip to content

Commit

Permalink
Remove unused argument for test method. (Taeung#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeant-wizard authored Apr 11, 2020
1 parent 496d3b9 commit 80fcb66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mnist/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def train(args, model, device, train_loader, optimizer, epoch):
100. * batch_idx / len(train_loader), loss.item()))


def test(args, model, device, test_loader):
def test(model, device, test_loader):
model.eval()
test_loss = 0
correct = 0
Expand Down Expand Up @@ -118,7 +118,7 @@ def main():
scheduler = StepLR(optimizer, step_size=1, gamma=args.gamma)
for epoch in range(1, args.epochs + 1):
train(args, model, device, train_loader, optimizer, epoch)
test(args, model, device, test_loader)
test(model, device, test_loader)
scheduler.step()

if args.save_model:
Expand Down

0 comments on commit 80fcb66

Please sign in to comment.