Skip to content

Commit b1797e6

Browse files
committed
fixed log smnist
1 parent 5915981 commit b1797e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sMNIST/sMNIST_task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def test(data_loader):
7070
optimizer.step()
7171

7272
valid_acc = test(valid_loader)
73+
test_acc = test(test_loader)
7374
Path('result').mkdir(parents=True, exist_ok=True)
7475
f = open('result/sMNIST_log.txt', 'a')
7576
if (epoch == 0):
@@ -82,7 +83,6 @@ def test(data_loader):
8283
for param_group in optimizer.param_groups:
8384
param_group['lr'] = args.lr
8485

85-
test_acc = test(test_loader)
8686
f = open('result/sMNIST_log.txt', 'a')
8787
f.write('final test accuracy: ' + str(round(test_acc, 2)) + '\n')
8888
f.close()

0 commit comments

Comments
 (0)