Skip to content

Commit 63561e0

Browse files
authored
Update demo_LeNet5_KFAC.py
1 parent 33e606e commit 63561e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misc/demo_LeNet5_KFAC.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import torch.nn.functional as F
44
import torch.optim as optim
55
from torchvision import datasets, transforms
6-
from kfac import KFAC
6+
from kfac import KFAC#download from https://gist.github.com/Thrandis/9b3f75a130ec6c24a64117b7d9304c3f
77

88
train_loader = torch.utils.data.DataLoader(
99
datasets.MNIST('../data', train=True, download=True,
@@ -69,4 +69,4 @@ def test_loss(model, test_loader):
6969
lr0 = 0.5*lr0
7070
optimizer.param_groups[0]['lr'] = lr0
7171
TestLoss.append(test_loss(model, test_loader))
72-
print('Epoch: {}; best test loss: {}'.format(epoch, min(TestLoss)))
72+
print('Epoch: {}; best test loss: {}'.format(epoch, min(TestLoss)))

0 commit comments

Comments
 (0)