e6484cd61d31a38f96729a70c1f461fc18b3d8ce,examples/mnist_grid.py,,train,#Any#,97
Before Change
optimizer.step()
pred = output.data.max(1)[1]
correct = pred.eq(target.data).cpu().sum()
acc = correct / target.size(0)
print("Epoch:", epoch, "Batch:", batch, "Loss:", loss.data[0],
"Accuracy:", acc)
After Change
def train(epoch):
model.train()
if epoch == 11:
for param_group in optimizer.param_groups:
param_group["lr"] = 0.0001
for batch, (data, target) in enumerate(train_loader):
data = data.view(data.size(0), -1, 1)
input = torch.cat([perm_input(img, perm) for img in data], dim=0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: e6484cd61d31a38f96729a70c1f461fc18b3d8ce
Time: 2017-11-08
Author: matthias.fey@tu-dortmund.de
File Name: examples/mnist_grid.py
Class Name:
Method Name: train
Project Name: graphbrain/graphbrain
Commit Name: d9a13bc09009ac81a913b26c2f024e44612456da
Time: 2017-11-11
Author: telmo@telmomenezes.net
File Name: gb/synonyms/meronomy.py
Class Name: Meronomy
Method Name: generate_synonyms
Project Name: rusty1s/pytorch_geometric
Commit Name: c6349f5f1a8955419d396c7ac74f782f6f00a443
Time: 2017-11-03
Author: matthias.fey@tu-dortmund.de
File Name: examples/mnist_superpixel_75.py
Class Name:
Method Name: train