We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5915981 commit b1797e6Copy full SHA for b1797e6
sMNIST/sMNIST_task.py
@@ -70,6 +70,7 @@ def test(data_loader):
70
optimizer.step()
71
72
valid_acc = test(valid_loader)
73
+ test_acc = test(test_loader)
74
Path('result').mkdir(parents=True, exist_ok=True)
75
f = open('result/sMNIST_log.txt', 'a')
76
if (epoch == 0):
@@ -82,7 +83,6 @@ def test(data_loader):
82
83
for param_group in optimizer.param_groups:
84
param_group['lr'] = args.lr
85
-test_acc = test(test_loader)
86
87
f.write('final test accuracy: ' + str(round(test_acc, 2)) + '\n')
88
f.close()
0 commit comments