960518e2734a42f7da19dc3d4d49501004c037e1,mnist/main.py,,,#,54
Before Change
TEST_BATCH_SIZE = 1000
NUM_EPOCHS = 2
optimizer = optim.SGD(model, lr=1e-2, momentum=0.9)
def train(epoch):
batch_data = Variable(torch.cuda.FloatTensor(BATCH_SIZE, 1, 28, 28), requires_grad=False)
batch_targets = Variable(torch.cuda.FloatTensor(BATCH_SIZE), requires_grad=False)
After Change
def print_header(msg):
print("===>", msg)
if not os.path.exists("data/processed/training.pt"):
import data
print_header("Loading data")
with open("data/processed/training.pt", "rb") as f:
training_set = torch.load(f)
with open("data/processed/test.pt", "rb") as f:

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: pytorch/examples
Commit Name: 960518e2734a42f7da19dc3d4d49501004c037e1
Time: 2016-09-25
Author: cfarabet@twitter.com
File Name: mnist/main.py
Class Name:
Method Name:
Project Name: tensorflow/models
Commit Name: a87bb1855e9f01303c878e6fbb7b16502a1611ab
Time: 2020-08-26
Author: ruomei.yan@arm.com
File Name: official/benchmark/models/resnet_imagenet_main.py
Class Name:
Method Name: run