031392ff2cbb5703558d17a676a456521f754190,mnist/main.py,,,#,54

Before Change


TEST_BATCH_SIZE = 1000
NUM_EPOCHS = 2

optimizer = optim.SGD(model.parameters(), lr=1e-2, momentum=0.9)

def train(epoch):
    batch_data_t = torch.FloatTensor(BATCH_SIZE, 1, 28, 28)
    batch_targets_t = torch.LongTensor(BATCH_SIZE)

After Change


        test_loss, correct, test_data.size(0),
        float(correct)/test_data.size(0)*100))

for epoch in range(1, opt.nEpochs+1):
    train(epoch)
    test(epoch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: pytorch/examples
Commit Name: 031392ff2cbb5703558d17a676a456521f754190
Time: 2016-12-15
Author: soumith@fb.com
File Name: mnist/main.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 963f7d1777cd20af3be30df40633356ba82a6b0c
Time: 2018-02-02
Author: Kaixhin@users.noreply.github.com
File Name: vae/main.py
Class Name:
Method Name:


Project Name: pytorch/examples
Commit Name: 031392ff2cbb5703558d17a676a456521f754190
Time: 2016-12-15
Author: soumith@fb.com
File Name: mnist/main.py
Class Name:
Method Name: